CKEditor 4.4.1即使在设置样式时也缺少空锚定标记

CKEditor 4.4.1即使在设置样式时也缺少空锚定标记,ckeditor,anchor,Ckeditor,Anchor,多年来,我们一直在css中使用空锚定标记来允许悬停状态没有问题。下面是css和html的示例 a#phone:link, a#phone:visited { width:34px; height:34px; display:inline-block; background:url(phone.png) center top no-repeat; } a#phone:active, a#phone:hover { background:url(phone-hover.png) center top

多年来,我们一直在css中使用空锚定标记来允许悬停状态没有问题。下面是css和html的示例

a#phone:link, a#phone:visited { width:34px; height:34px; display:inline-block; background:url(phone.png) center top no-repeat; }
a#phone:active, a#phone:hover { background:url(phone-hover.png) center top no-repeat; }
<a href="/contact.php" id="email" title="Contact Us"></a>
a#phone:链接,a#phone:已访问{宽度:34px;高度:34px;显示:内联块;背景:url(phone.png)中心顶部不重复;}
a#phone:active,a#phone:hover{background:url(phone hover.png)中间顶部不重复;}
经过大量的挖掘,我终于让cke停止删除我的空锚标签,下面是我所做的,如果有兴趣或有帮助的话。我尝试将removeEmpty设置为空,但在添加protectedSource之前,该设置无效:

config.contentsCss = '/css/editor.css';
config.protectedSource.push(/<a[^>]*><\/a>/g);
enterCKEDITOR.dtd.$removeEmpty.a = 0; code here
config.contentsCss='/css/editor.css';
config.protectedSource.push(/]*>/g);
enterCKEDITOR.dtd.$removempty.a=0;代码在这里
这最终阻止了cke删除标记,但是图标仍然没有出现在wysiwyg编辑器中。这一切都在代码视图中

我已经安装了stylesheetparser,链接css文件中的其他样式显示正确,包括定义了width/max width的浮动div

当我在Dreamweaver或web浏览器中查看网页时,所有图标都在那里并且工作正常,但链接/图标不会出现在cke中。我可以/已经添加了一个不间断空间,但这会增加边距/线条高度,并且会弄乱路线设计和布局

我错过了什么?这是预期的行为吗?我认为不应该。这是虫子吗

有什么想法/想法/帮助吗?谢谢