CK编辑器重复保存后删除类

时间:2019-02-18 16:30:52

标签: html ckeditor

例如,当我输入wysiwig时

<div class="jedna">xxx</div>

并保存表格,一切正常。类已保存并显示。

但是当我再次打开带有内容的表单时,即使“ config.allowedContent = true;”也删除了class属性。在config.js中配置。 那怎么可能?

我的ckeditor配置文件 config.js

CKEDITOR.editorConfig = function( config ) {
config.extraPlugins = "youtube,wordcount";

config.toolbarGroups = [
    { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
    { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
    { name: 'links' },
    { name: 'insert' },
    { name: 'forms' },
    { name: 'tools' },
    { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'others' },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align' ] ,
    { name: 'styles' },
    { name: 'colors' },
    { name: 'about' }
];

config.removeButtons = 'Underline,Subscript,Superscript';

config.format_tags = 'div;p;h2;h3;h4;h5;pre';

config.removeDialogTabs = 'image:advanced;link:advanced';

config.wordcount = {
    showParagraphs: false,
    showWordCount: false,
    showCharCount: true
};
config.allowedContent = true;
};

0 个答案:

没有答案