M使用ckeditor,我想添加字数统计和拼写检查功能, 任何人都可以帮助我,我已经下载了字数的插件 以下是我的代码
CKEDITOR.editorConfig = function (config) {
// Define changes to default configuration here. For example:
// config.language = 'fr';`
// config.uiColor = '#AADC6E';
config.extraPlugins = 'onchange, wordcount';
config.minimumChangeMilliseconds = 100;
config.htmlEncodeOutput = false;
config.toolbar_Custom = [
{ name: 'styles', items: ['Styles', 'Format'] },
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', '-', 'RemoveFormat'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Blockquote'] },
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
];
config.toolbar_Full.push(['CountSelection']);
};
答案 0 :(得分:1)
尝试添加此行并从wordcount
config.extraPlugins
config.plugins = 'wordcount';
同时将此行添加到config.toolbar_Custom
数组:
{ name: 'editing', items: [ 'SpellChecker' ] },
希望这有帮助