CKEditor classes being stripped

主宰稳场 提交于 2019-12-31 03:43:46

问题


I have a custom plugin that adds a link with a class attached. When I view this using the Source button it shows the class and looks as it should. However, when I go back to WYSYWIG view and then view the source again the class has been stripped out.

Any idea how to stop this happening?

Thanks in advance for your help.


回答1:


Check this blog post.

In CKEditor 4.1 RC we've introduced ACF - Advanced Content Filter. You need to integrate your plugin with it, because otherwise special content created by it is stripped.




回答2:


For CKEditor4 and for simple config.js modification, disabling the "default filters": see this new question/answer.


(copy)

At config.js you can add something like,

  CKEDITOR.config.allowedContent=true;

see "Advanced Content Filter" (ACF) and how to enable/disable it.



来源:https://stackoverflow.com/questions/15525930/ckeditor-classes-being-stripped

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!