如何修改CKEditor的内容CSS样式
在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)
您可能感兴趣的文章
- 06-15HTML+CSS布局图标文字混排
- 06-13CKEditor编辑器allowedContent过滤器规则设置教程
- 06-13CSS清除浮动的三种方法
- 04-23ckeditor Error code: exportpdf-no-token-url. 异常
- 03-28比较好看h1 h2 h3的css自定义样式
- 03-23VUE中使用CKEditor5富文本插件
- 03-21CSS中margin和padding的区别
- 03-16HTML-CSS一条水平线两种不同的颜色怎么实现?
- 03-16CSS鼠标点击出现有颜色的边框?如何解决
- 03-13CSS去除标签em的斜体
- 03-13纯CSS实现垂直居中的几种方法
- 12-10CSS去除重叠边框
- 09-11CKEditor配置属性大全
- 09-11CKEditor去掉超链接和高级的方法及上传和图像对调位置
- 09-10CKEditor和CKFinder屏蔽/开启“浏览服务器”按钮
- 09-10自定义Ckeditor工具栏
- 09-10ckfinder 3.x 文件上传重命名修改方法
- 06-26CKEditor 4 编辑器添加code标签按钮的方法
- 05-14CKEditor 5 编辑器设置语言高度以及项目中调用方法
- 05-13CKEditor 5 在线生成工具online-builder使用方法

最近更新
阅读排行
猜你喜欢
- 01-11德平堂药业-德平堂药业应用软件功能介
- 01-14赶闲集-赶闲集应用软件功能介绍
- 12-03全民k歌如何邀请好友一起唱歌
- 09-20苹果手机微信无法访问相册怎么办
- 02-29Nginx 301 302跳转配置设置方法
- 02-20Ubuntu使用命令刷新DNS缓存提高网站访
- 09-11苹果手机芒果tv如何取消自动续费服务
- 10-01opporeno6pro怎么黑屏快速开启手电筒
- 12-27iphone手机怎么开启画中画
- 01-11文本编辑工具-文本编辑工具应用软件功