网页CSS覆盖ckeditor 3样式 [英] webpage css overrides ckeditor 3 style

查看:84
本文介绍了网页CSS覆盖ckeditor 3样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面加载了screen.css,其中包含 evil 规则,出于各种原因,我无法删除或修改该规则:

I've got a page where I load screen.css which contains an evil rule, which for various reasons I cannot remove or modify:

a {
    background: red !important;
}

我使用 CKEditor 3.x 在同一页面上,问题是,无论我选择哪种样式(v2,kama,office2003),编辑器的按钮都显示为红色。

I use CKEditor 3.x on the same page and the problem is that, no matter which style I choose (v2, kama, office2003), the buttons of the editor look red.

FCKeditor 2.x对此没有问题,因为它正在创建一个iframe来承载整个编辑器实例。因此,邪恶的css代码段甚至不存在于其页面中。

FCKeditor 2.x didn't have an issue with this because it was creating an iframe to host the whole editor instance. Thus the evil css snippet didn't even exist in its page.

新的CKEditor 3.x虽然使用div和表来承载编辑器包装和按钮,然后使用iframe仅用于丰富的文本区域内容。

The new CKEditor 3.x though uses divs and tables to host the editor wrapper and buttons and then an iframe just for the rich textarea content.

有什么解决方案吗?

谢谢

推荐答案

2.x样式包装器iframe(默认情况下会解决此问题)由于性能原因而被删除,无法通过选项实现,只有在我自己实现的情况下才能实现

The 2.x style wrapper iframe (which would by default solve this problem) was removed for performance reasons and is not possible via an option but only if I implement it my self.

我要解决的这个问题是修改 kama皮肤的css文件,并在需要的地方添加!important规则。我觉得这不是一个可以接受的解决方案。

What I did to overcome this problem was to modify the css files of the "kama" skin, adding !important rules to where I needed them. I don't feel this is an acceptable solution though.

这篇关于网页CSS覆盖ckeditor 3样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆