gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 08:33:49 25 4
gpt4 key购买 nike

我在设置 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';
};

最佳答案

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

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

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

关于javascript - CK编辑器config.js更改不起作用(基本版本),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21499136/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com