创建 CKEDITOR 实例时如何动态更改插件的设置?
我在自定义config.js中编写:
config.wordcount = {
// Whether or not you want to show the Word Count
showWordCount: false,
// Whether or not you want to show the Char Count
showCharCount: true
};
我想要做的是将 maxCharCount
设置为某个值,具体取决于 CKEDITOR 实例。
有没有简单的方法可以实现这一点?
最佳答案
找到解决方案:
CKEDITOR.replace('field', {
wordcount: {'showWordCount': false,
'showParagraphs': false,
'showCharCount': true,
'maxCharCount': 100
}
});
关于javascript - 如何在CKEDITOR中动态更改插件设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34606896/