我正在尝试使用nicedit
目前我正在使用它将nicedit添加到所有文本区域:
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
如何配置这些wysiwygs?我发现我可以通过以下方式配置单个方框:
new nicEditor({fullPanel : true}).panelInstance('area2');
但是如何在使用bkLib.onDomLoaded(nicEditors.allTextAreas);
?
我很困惑。
谢谢!
为了它的价值,我们也有jquery运行。
答案 0 :(得分:11)
这是对问题的正确答案...... 在NicEdit的文档中确实缺少这一点。 这可以使用相同的自定义配置配置所有textareas。
bkLib.onDomLoaded(function() {
nicEditors.allTextAreas({buttonList : ['bold','italic','underline']});
});
答案 1 :(得分:0)
下载nicedit-latest.js并使用它。
在nicedit-latest.js中找到
if(type&&(hasButton||this.ne.options.fullPanel))
(它位于第40行。)
删除它及其括号
{ }
但不是括号之间的这一行
this.panelButtons.push(new type(this.panelElm,buttonName,options,this.ne));if(!hasButton){this.buttonList.push(buttonName)}
保存并重试。所有textareas将有完整的小组:)