CKEditor条< i>标签 [英] CKEditor strips <i> Tag
问题描述
我试图找到一个解决方案,以避免CKEditor,但也旧的FCKeditor从先前插入的内容中除去任何
< i>
db。
案例:
我将html内容插入db,一些内容包含< i>
元素。
我用CKEditor这样做。
一切正常,内容出现在网页上。
但是当我要编辑以前插入的内容时,会缺少< i>
元素。
<在我的具体情况下,我使用:
< i class =fa-icon- fullscreen fa-icon-xxlarge main-color>< / i>
当然,如果我禁用编辑器,内容在textarea中显示得很好。
我找到了解决这个特定的问题,我遇到了< i>
标签
我从 drupal论坛获得的原始答案
修复或调整(你命名它)是为了在ckeditors config.js中设置以下内容:
// ALLOW< i>< / i>
config.protectedSource.push(/< i [^>] *>< \ / i> / g);
感谢 Spasticdonkey 指向我的链接。 / em>
I'm trying to find a solution to avoid CKEditor, but also the older FCKeditor strips out any
<i>
tag from previously inserted content to the db.
Case:
I insert html content to the db, some content contain the <i>
elements.
I do this with the CKEditor.
Everything works perfect and the content shows up on the webpage.
But when i want to edit the previously inserted content, the <i>
elements are missing.
In my specific case i use:
<i class="fa-icon-fullscreen fa-icon-xxlarge main-color"></i>
Of course if i disable the editor, the content shows up just fine in the textarea.
I found the solution for this specific problem i ran into with the <i>
tag
The original answer i got from drupal forum
The fix or tweak (you name it) for it is to set the following into the ckeditors config.js:
// ALLOW <i></i>
config.protectedSource.push(/<i[^>]*><\/i>/g);
Thanks to Spasticdonkey for pointing me to the link.
这篇关于CKEditor条< i>标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!