【问题标题】:CKEditor automatically strips All div and classes and attributeCKEditor 自动剥离所有 div 和类和属性
【发布时间】:2016-05-15 10:45:08
【问题描述】:

我正在使用 codeigniter 框架中的 CkeditorCkfinder 当我上传 HTML 并转到源代码时,所有 div 标签条以及所有类条。

我已经更改了 config.js 文件

config.allowedContent = true; 

但它不会改变任何事情。我也混淆了我得到的 config.js ckeditor/config.js 文件,其中有一个函数CKEDITOR.editorConfig()

这是正确的文件吗?以及如何应对这种情况。

【问题讨论】:

标签: javascript php codeigniter


【解决方案1】:

您可以通过 ckeditor/config.js 文件允许内容。

CKEDITOR.editorConfig = function (config) {
    // other config items
    config.extraAllowedContent = 'div(*)';
};

【讨论】:

    猜你喜欢
    • 2013-03-17
    • 1970-01-01
    • 1970-01-01
    • 2014-04-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-19
    • 1970-01-01
    相关资源
    最近更新 更多