【发布时间】:2013-07-11 09:25:59
【问题描述】:
我在我的网站中使用Fontawesome 并拥有自己的 CMS 来编辑网站页面。我想为用户开发一个对话框,他可以在其中选择一个很棒的图标,但现在可以将它们添加到 ckeditor 的代码视图中。
添加到内容的图标不会显示在 ckeditor 设计视图中。我已更改 ckeditor 配置文件,以便编辑器接受 i 标签 (*)。我将 fontawesome CSS 文件作为 @import 规则添加到 contents.css,但在编辑器区域中仍然看不到 fontawesome 图标。
(*)config.js
config.allowedContent = true;
config.ProtectedTags = 'i' ;
config.protectedSource.push( /<i[\s\S]*?\>/g ); //allows beginning <i> tag
config.protectedSource.push( /<\/i[\s\S]*?\>/g ); //allows ending </i> tag
我可以做些什么来完成这项工作?
【问题讨论】:
标签: ckeditor font-awesome