ckeditor添加字数统计功能

时间:2013-09-02 07:00:12

标签: asp.net-mvc-3 ckeditor

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']);

};

1 个答案:

答案 0 :(得分:1)

尝试添加此行并从wordcount

中删除config.extraPlugins
config.plugins = 'wordcount';

同时将此行添加到config.toolbar_Custom数组:

{ name: 'editing', items: [ 'SpellChecker' ] },

希望这有帮助