为什么CKEditor删除链接和属性 [英] Why is CKEditor removing links and attributes
问题描述
我有一个内联属性 style =color:#FF0000;
的链接。我最近升级到最新的CKEditor,经过多年的忽视。现在当我调用 CKEDITOR.inline
时,它会删除所有的链接。
I have a link with an inline attribute of style="color: #FF0000;"
. I recently upgraded to latest CKEditor, after years of neglect. Now when I call CKEDITOR.inline
, it strips all the links.
我发现 http://docs.ckeditor.com/#!/api/CKEDITOR.dtd-property -S-editable ,其中没有 a
。
code> CKEDITOR.dtd。$ editable.a = 1; ,它仍然剥离链接。我在这里缺少什么?我真的按照API inline
调用的流程,但似乎我做错了。
I did CKEDITOR.dtd.$editable.a = 1;
and it still strips links. What am I missing here? I literally followed the flow from the API inline
call to that, but it seems that I'm doing something wrong.
EDIT
我还发现从元素中删除了 class
属性。一切都好起来。
EDIT
I also find that is removing the class
attribute from elements. Everything else seems okay.
推荐答案
查看有关 CKEditor中的内容过滤(ACF)。另请参阅 CKEditor SDK中的工作示例,其中显示了ACF在默认自动模式下的工作方式,如何调整它(这是你需要做的你的情况下)。
Check out the guide about content filtering (ACF) in CKEditor. See also the working sample in CKEditor SDK which shows how ACF works in the default automatic mode and how to adjust it (which is what you need to do in your case).
这篇关于为什么CKEditor删除链接和属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!