欢迎来到资源库(www.zyku.net)

工具资源

当前位置:首页 > 网站运营 > 工具资源 > CKEditor

如何修改CKEditor的内容CSS样式

时间:2022-01-12|栏目:工具资源|点击:|我要投稿

在ckeditor文件夹下找到contents.css,如果是使用config.contentsCss设置加载指定的css文件,那就找到对应的css文件然后编辑样式。

比如说,希望在编辑模式下默认的<p>都是首行缩进的,那就可以在contents.css文件中加入:

p{
text-indent:2em;
}
Edit the contents.css file that's located in the main CKEditor directory or use the config.contentsCss setting to load a different file.

I see that you confused the styles system settings with content styling. These are two totally different things - styles system is responsible for applying and removing "styles" to selected content - it's used e.g. by styles and format drop downs as well as bold or italic buttons - all of them are "styles".

As for CKEDITOR.addCss() - this method is to be used by plugins mostly and it has to be used before editor is created. Actually, its doc says exactly this and mentions that you should use contents.css ;).

(资源库 www.zyku.net)

上一篇:SuperSlide插件介绍以及使用教程

栏    目:工具资源

下一篇:ckeditor编辑器的详细配置

本文标题:如何修改CKEditor的内容CSS样式

本文地址:https://www.zyku.net/gongju/8505.html

关于我们 | 版权申明 | 寻求合作 |

重要申明:本站所有的文章、图片、评论等内容,均由网友发表或上传并维护或收集自网络,仅供个人学习交流使用,版权归原作者所有。

如有侵犯您的版权,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:95148658 | 邮箱:mb8#qq.com(#换成@)

苏ICP备2020066115号-1

本网站由提供CDN加速/云存储服务