CKEditor 4.2.2 - allowedContent = true不工作 [英] CKEditor 4.2.2 - allowedContent = true is not working
本文介绍了CKEditor 4.2.2 - allowedContent = true不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想我已经阅读了大部分的SO问题和CKEditor文档,但是它不适合我。
I guess I've read most of the SO questions and CKEditor documentation about this, but it does not work for me.
它应该很简单,在我的CKEditor config.js中,我有这样:
It should be plain and simple, in my CKEditor config.js, I have this :
CKEDITOR.editorConfig = function(config) {
config.allowedContent = true;
};
但是html仍然被过滤,这段代码被删除:
But the html is still filtered and this piece of code is being stripped :
<p>
<a href="/site/public/press.pdf"><span class="icon-presseFile"></span></a>
<a href="/site/public/pics.zip"><span class="icon-pressePics"></span></a>
</p>
:
<p> </p>
< span>
任何帮助将非常感激。
如果我在< span>
元素中添加一些文本(但我不想这样做) >
EDIT
It works if I add some text in the <span>
elements (but I don't want tohave to do that)
推荐答案
我发现我必须在主配置函数中添加OUTSIDE。
I found that I had to add it OUTSIDE of the main config function.
这样工作:
CKEDITOR.editorConfig = function( config ) {
...
};
CKEDITOR.config.allowedContent = true;
但这没有:
CKEDITOR.editorConfig = function( config ) {
config.allowedContent = true;
...
};
这篇关于CKEditor 4.2.2 - allowedContent = true不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文