1
我试图限制CKEditor的HTML编辑行为时切换源和wysiwyg模式。目前,当我从源代码切换到wysiwyg时,编辑器删除添加到<span>
标签的所有属性。它不会对任何其他标签重复此行为。CKeditor允许内容表现奇怪
我已经在自定义插件中设置了CKEDITOR.config.allowedContent = true;
以及注册了allowedContent: 'span[*]'
。 allowedContent设置阻止编辑器完全删除标签,但属性仍然被剥离。我试图保持的整个代码如下。
谢谢!
<div class="float_right_caption_drop" style="width: 243px">
<span style="width: 233px;">
<img class="float_img" src="/images/fox.jpg" width="233" border="0" alt="" />
<br />Fox Caption</span></div>
非常感谢!奇迹般有效。 –
我正在寻找这个小时。我在不同的地方尝试了'ul [class]'',但是无法使它工作。 “'ul(*)”立即解决了它。谢谢。 – Niklaus
不适用于我,无论是使用您的解决方案还是使用allowedContent = true: - \其他任何想法? – Piero