Adding multiple content CSS files to CKEditor

南楼画角 提交于 2019-12-14 00:57:20

问题


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';

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';

I am using v 4.1.1


回答1:


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' ];


来源:https://stackoverflow.com/questions/29433760/adding-multiple-content-css-files-to-ckeditor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!