ckeditor带< span>和样式属性 [英] ckeditor strips <span> and style attributes

查看:362
本文介绍了ckeditor带< span>和样式属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Drupal 7网站使用ckeditor 4.2。我创建了一个基本的页面节点,并将一个span放在h2标题内。我硬编码它在html视图。它看起来不错,但如果我回去编辑页面,我的html和任何style =我已经放入html也。我看看ckeditor配置和文本格式。我设置了唯一的格式允许的文本和完整的html,所以我不使用过滤。是什么赋予了?

I have a Drupal 7 site using ckeditor 4.2. I've created a basic page node and put a span inside an h2 heading in the body. I hard coded it in the html view. It looks fine but if I go back to edit the page, my has gotten stipped out of the html and also any style="" I've put into the html also. I've looked at the ckeditor config and text-formats. I've set the only formats allowed to be text and full html so I'm not using filtered at all. What gives? I've used the editor many times before but probably not this version.

推荐答案

如果您使用 CKeditor 模块,则高级选项中还有一个选项也在模块中提及首页您应该设置:

If you are using the CKeditor module then there is an option in Advanced Options that is also mentioned in the module homepage where you should set:

config.allowedContent = true;

这篇关于ckeditor带< span>和样式属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆