CKEditor剥离内联属性

CKEditor剥离内联属性

本文介绍了CKEditor剥离内联属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用CKEditor一段时间,它的工作非常好。我已经几乎摆脱了任何问题,ive已,但这一个我不能似乎弄清楚。当我在< p>< / p>

I have been using CKEditor for some time and it has worked great. I've pretty much gotten rid of any problems that ive had but this one i cant seem to figure out. When i add inline attributes to elements for instance style = "color: #ff0;" on a <p></p> tag they are stripped out when i switch from wysiwyg to source view. No saving or submission is done and ckeditor is has been added to my site which is my own script. Any ideas as to what would cause this. All of the search results i can find correspond to this happening in Drupal but Drupal seems to be the problem not the editor in all instances. Thanks again!

推荐答案

感觉您使用的是CKEditor 4.1+,附带。如果是,您需要指定 config.allowedContent 和让你的东西工作。您也可能对。

It feels like you're using CKEditor 4.1+ that comes with Advanced Content Filter (ACF). If so, you need to specify config.allowedContent and configure it to get your things working. You may also be interested in config.extraAllowedContent.

有关详情,请参阅详情。

See this answer for more details.

这篇关于CKEditor剥离内联属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 22:27