我正在使用字数插件的ckeditor进行字数计数。作为这个插件的要求,我添加了插件'notification'.我的问题是,在添加通知插件之后,通过按键复制并粘贴到禁用的。我在控制台中收到以下错误:注意:字数显示正确。
TypeError: CKEDITOR.tools.getUniqueId不是一个函数Notification@ plugin.js?t=E4KA:121 (匿名函数)@ plugin.js?t=E4KA:360 i@ ckeditor.js:10 CKEDITOR.event.CKEDITOR.event.fire @ ckeditor.js:12 CKEDITOR.editor.CKEDITOR.editor.fire @ ckeditor.js:13 f@ ckeditor.js:594 (匿名函数)@ ckeditor.js:599 (匿名函数)@ ckeditor.js:598
我的代码如下所示,用于添加单词计数和其他插件:
CKEDITOR.config.extraPlugins = 'toolbar';
CKEDITOR.config.extraPlugins = 'htmlwriter';
CKEDITOR.config.extraPlugins = 'notification';
CKEDITOR.config.extraPlugins = 'wordcount';
CKEDITOR.config.wordcount = {
showParagraphs: true,
showWordCount: true,
countSpacesAsChars: false,
countHTML: false,
maxWordCount: 10
};
我在这里做错什么了吗?请帮帮我。任何帮助都将不胜感激。
发布于 2016-04-07 08:54:30
首先,把这个转换一下
CKEDITOR.config.extraPlugins = 'toolbar';
CKEDITOR.config.extraPlugins = 'htmlwriter';
CKEDITOR.config.extraPlugins = 'notification';
CKEDITOR.config.extraPlugins = 'wordcount';
到这里来
CKEDITOR.config.extraPlugins = 'toolbar,htmlwriter,notification,wordcount';
因为您正在覆盖变量CKEDITOR.config.extraPlugins值。
https://stackoverflow.com/questions/31847514
复制相似问题