我的config.js如下

    CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For complete reference see:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config
    config.height='10em';
    // The toolbar groups arrangement, optimized for a single toolbar row.
    config.toolbarGroups = [
        { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
        { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
        { name: 'forms' },
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
        /*{ name: 'links' },*/
        { name: 'insert' },
        { name: 'styles' },
        { name: 'colors' },
        { name: 'tools' },
        { name: 'others' }
        /*{ name: 'about' }*/
    ];
    config.enterMode = CKEDITOR.ENTER_BR;
    // The default plugins included in the basic setup define some buttons that
    // are not needed in a basic editor. They are removed here.
    config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript';

    // Dialog windows are also simplified.
    config.removeDialogTabs = 'link:advanced';
    config.extraPlugins = 'scayt';
};


通过添加config.extraPlugins = 'scayt';我的Ckeditor被禁用,我将scayt文件夹放在CKEditor的plugins文件夹中。如果您知道我做错了什么,请提供帮助。我想在CKeditor中添加拼写检查器。

最佳答案

我也为此感到挣扎。
对我来说,解决方案是工具栏选项必须以大写字母“ S”开头
所以我不得不用“ Scayt”代替“ scayt”

CKEDITOR.config.toolbar_MA = [
    ['Scayt', '-', 'Cut', 'Copy', 'Paste', '-', 'Undo', 'Redo', 'Source'],
];
CKEDITOR.config.disableNativeSpellChecker = false;
CKEDITOR.config.defaultLanguage = 'fr';
CKEDITOR.config.language = 'fr';

// Turn on SCAYT automatically
CKEDITOR.config.scayt_autoStartup = true;
CKEDITOR.config.scayt_sLang = 'fr_FR';

关于javascript - 无法在CKEditor的工具栏中添加启用Scayt的功能,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31780251/

10-11 13:45