将多个内容CSS文件添加到CKEditor [英] Adding multiple content CSS files to CKEditor
本文介绍了将多个内容CSS文件添加到CKEditor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过CKEditor将超过1个CSS文件用作内容CSS?我已经在配置中添加了引导CSS。
How can I use more than 1 css file as content CSS with CKEditor? I already added bootstrap css in the config.
config.contentsCss = '/css/bootstrap.min.css';
我们的设计师创建了第二个CSS来自定义一些内容,我还需要将该CSS文件添加到CKEditor中。
Our designer created a 2nd css to customize some stuff and I also need to add that css file to CKEditor.
我尝试了以下变体,但到目前为止没有成功:
I tried variations below, but no success so far:
config.contentsCss = '/css/bootstrap.min.css', '/css/styles.css';
config.contentsCss = '/css/bootstrap.min.css, /css/styles.css';
我正在使用v 4.1.1
I am using v 4.1.1
推荐答案
config.contentsCss
文档对此非常清楚。此设置接受一个字符串或字符串数组。像这样:
The config.contentsCss
documentation is absolutely clear about this. This setting accepts a string or an array of strings. Like this:
config.contentsCss = [ '/css/mysitestyles.css', '/css/anotherfile.css' ];
这篇关于将多个内容CSS文件添加到CKEditor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文