我已经在我的网站的后端安装了CKEditor。 从代码视图切换到wysiwyg视图时出现以下问题。 我插入的代码是这样的:停止CKEditor去除div
<div class="span4">
<p>Some text here</p>
</div>
当我切换回视图模式的CKEditor自动删除包围段落在div。
任何人都可以请帮我解决这个问题吗?我不介意留在代码视图中,但我喜欢在视图模式下编写更长的文本。
在此先感谢。
我已经在我的网站的后端安装了CKEditor。 从代码视图切换到wysiwyg视图时出现以下问题。 我插入的代码是这样的:停止CKEditor去除div
<div class="span4">
<p>Some text here</p>
</div>
当我切换回视图模式的CKEditor自动删除包围段落在div。
任何人都可以请帮我解决这个问题吗?我不介意留在代码视图中,但我喜欢在视图模式下编写更长的文本。
在此先感谢。
禁用ACF功能,使用config.extraAllowedContent:
editor.config.extraAllowedContent = 'div(span4)';
或
editor.config.extraAllowedContent = 'div(*)';
像AlfonsoMl说,这有什么做的高级内容过滤器
有关这一切的支持看这里:http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
或把下面一行在你的配置,禁用内容过滤器。 (这是更好地配置它)而不是
CKEDITOR.config.allowedContent = true;
var editor1=CKEDITOR.replace('editor1');
editor1.config.allowedContent = true;
尝试CKEditor的配置文件中添加此'配置.protectedSource.push(%\ <.*\>。* \%i);' – sAnS
你好吗使用CKEditor 4.1?该版本包含一个新的“ACF”,用于删除其工具栏按钮不允许的任何内容。 – AlfonsoML
是的,我正在使用v4.1.1 – xonorageous