可以通过对位于 ckeditor 文件夹中的 config.js 文件进行一些更改来激活该插件。取消注释以下块:
//Example Lotus Spell Checker config.
/*
config.extraPlugins += ',lotusspellchecker';
config.lotusSpellChecker = {
restUrl:'',
lang:'en',
suggestions:'5',
format:'json',
highlight: { element : 'span', styles : { 'background-color' : 'yellow', 'color' : 'black' } },
preventCache: true
};
*/
注意:您需要提供要使用的任何拼写检查服务的 restUrl。这里的说明只解决“如何激活插件”的问题。
您还需要在富文本控件中提供一些 Dojo 属性:
这个添加了拼写检查按钮(LotusSpellChecker)到工具栏。
属性名称:工具栏
属性值: var myToolbar = "[['Format', 'Font','FontSize'], \n"
+"['Bold','Italic','Underline','Strike','-','TextColor','BGColor','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ,'-','NumberedList','BulletedList'],\n"
+"['缩进','缩进'], \n"
+"['下标','上标'],\n"
+"['RemoveFormat','-','MenuPaste','-','Undo','Redo','Find','LotusSpellChecker','-','Image','Table','Link' ,'Flash','-','PageBreak','HorizontalRule','SpecialChar','Blockquote','Smiley','ShowBlocks'],\n"
+"['BidiLtr','BidiRtl'],\n"
+"['最大化']]";
返回我的工具栏;
这个激活插件。
属性名称: extraPlugins
属性值:lotusspellchecker
这就是你得到的: