2017-05-26 79 views
1

我試圖添加一個富文本編輯器到我的應用程序。我正在使用nicEditnicEditor使用jquery添加/刪除圖標

bkLib.onDomLoaded(function() { 
    nicEditors.editors.push(new nicEditor().panelInstance(document.getElementById('single_answer_description'))); 
}); 

我添加了這部分將我的正常textarea轉換爲richtext編輯器。它看起來不錯:

enter image description here

我想現在要做的是,僅顯示一些像BIU的圖標。我不想要所有的圖標。我怎樣才能隱藏這些?我還希望在富文本編輯器內容中默認設置字體系列。

我試圖搜索這麼多的鏈接,但我無法得到任何適當的解決方案,這個問題。請幫我解決這個問題。提前致謝。

回答

1

the documentation

您可以添加,當你實例化對象你想要的按鈕的陣列。

bkLib.onDomLoaded(function() { 
    nicEditors.editors.push(
    new nicEditor({buttonList:['bold','italic']}).panelInstance(document.getElementById('single_answer_description'))); 
}); 
+0

是啊喬。正確而且我想在nicEditor中默認設置字體系列,不管是什麼可能是我體內的字體家族一旦粘貼它將需要將字體系列更改爲默認的方式 –

+0

這將是一個完全額外的代碼片段,我認爲它需要一個單獨的問題。 – Joe