CK编辑器config.js更改不起作用(基本版)

时间:2014-02-01 14:19:16

标签: javascript ckeditor

我在设置CKEditor时遇到问题。我设法使它工作,生产方面,但现在我需要调整一些选项,如:

config.entities_latin = false;

(在config.js内),它不起作用,它仍然会改变像:šđžćčšđ和& Scaron等字符。

我尝试过:config.autoParagraph = false;这也行不通。

但是,如果我从以下位置删除一些元素:config.toolbarGroups = [](这可行)..

请注意我必须使用基本版本(出于某种原因,标准版和完整版在服务器上根本不起作用,只在本地使用):S

任何人,请帮助... 这是整个config.js:

    /**
 * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For the complete reference:
    config.contentsLanguage = 'hr';
    config.entities_latin = false;
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config

    // 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' }

    ];

    // The default plugins included in the basic setup define some buttons that
    // we don't want too have in a basic editor. We remove them here.
    config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript';

    // Let's have it basic on dialogs as well.
    config.removeDialogTabs = 'link:advanced';
};

1 个答案:

答案 0 :(得分:0)

取决于您拥有的版本。尝试删除所有实体。这对我有用,我的cke输出是100%XML兼容的。

config.entities = false;
config.removePlugins = 'entities';

您也可以添加config.entities_greek = false;或拉丁语,但我认为这不是必要的。