0
我有以下nicEdit:http://nicedit.com/隱藏/顯示nicEdit使用按鈕
我想使用像這樣的功能:對
function submitTextEditor() {
document.getElementById(".nicEdit-panelContain").style.color = "red";
$(".nicEdit-panelContain").css("display", "none");
}
function editTextEditor() {
document.getElementById(".nicEdit-panelContain").style.color = "red";
$(".nicEdit-panelContain").css("display", "block");
}
要嘗試
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<script type="text/javascript" src="../nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<h4 style="text-align:center;">Generate Job Overview</h4>
<p>
Within this overview, please make note of all necessary information, conditions, expectations and etc to
better assist Freelancer review.
</p>
<textarea id="createJob" name="area3" class="col-xs-8 col-sm-8 col-md-8 col-lg-8" style="width: 100%; height: 50%;">
HTML <b>content</b> <i>default</i> in textarea
</textarea>
<button type="submit" class="btn btn-primary" onclick="editTextEditor()" style="background-color:#006dcc;">Edit</button>
<button type="submit" class="btn btn-primary" onclick="submitTextEditor()" style="background-color:#006dcc;">Submit</button>
</div>
使用安裝不僅隱藏了面板編輯,而且還使文本只讀。 不知道如何去做這件事。上面的函數我也嘗試過使用textarea「createJob」的id,但沒有運氣。有什麼建議麼?
我想引用how to set nicedit uneditable但對於任何例子或者