我正在尝试使用 尼迪蒂

目前,我正在使用它将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运行。

有帮助吗?

解决方案

这是问题的正确答案...这在Nicedit的文档中确实缺少。因此,可以使用相同的自定义配置配置所有Textareas。

   bkLib.onDomLoaded(function() {
      nicEditors.allTextAreas({buttonList : ['bold','italic','underline']});
   }); 

其他提示

下载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都将拥有完整的面板:)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top