当我们尝试指定CKEditor
时,我们尝试将Widget
用作Vignette
content css outside the environment of CKEditor
,如:
"CKEDITOR.config.contentsCss = 'http://lvhost:27110/CKEditorbk/my.css';"
不起作用,但是当我们指定战争中包含的内容css时,我们将部署ckeditor,例如:
CKEDITOR.config.contentsCss = 'http://lvhost:27110/CKEditor/ckeditor/my.css';
它正如我们预期的那样工作。 Isn't possible to specify a css outside "CKEditor.basepath"?
答案 0 :(得分:1)
实际上你不能,因为CKEditor路径范围是名为ckeditor
的文件夹中的任何内容。
但是,您可以通过复制相同的文件夹结构/js/CUSTOM_CKEDITOR/ckeditor
将您的自定义CSS放在CKeditor的ckeditor之外。当我为CKeditor编写插件时,我已经这样做了。
我在/js/CUSTOM_CKEDITOR/ckeditor/plugins/my_plugin/css/custom.css
有一个自定义css。在我使用的/js/CUSTOM_CKEDITOR/ckeditor/config.js
中:
CKEDITOR.config.contentsCss = CKEDITOR.plugins.getPath( 'my_plugin' ) + 'css/custom.css';
作品甜蜜:)