问题
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.
I found http://docs.ckeditor.com/#!/api/CKEDITOR.dtd-property-S-editable, which doesn't have an a
in there.
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
I also find that is removing the class
attribute from elements. Everything else seems okay.
回答1:
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).
来源:https://stackoverflow.com/questions/26064496/why-is-ckeditor-removing-links-and-attributes