在CKEditor.basepath之外指定contentCss时出现问题

在CKEditor.basepath之外指定contentCss时出现问题,ckeditor,vignette,Ckeditor,Vignette,我们试图将CKEditor用作Vignette的小部件,当我们试图在CKEditor环境之外指定内容css时,例如: "CKEDITOR.config.contentsCss = 'http://lvhost:27110/CKEditorbk/my.css';" 不起作用,但当我们指定包含在war中的内容css时,我们部署了ckeditor,例如: CKEDITOR.config.contentsCss = 'http://lvhost:27110/CKEditor/ckeditor/my.

我们试图将
CKEditor
用作
Vignette
小部件
,当我们试图在CKEditor环境之外指定
内容css时,例如:

"CKEDITOR.config.contentsCss = 'http://lvhost:27110/CKEditorbk/my.css';" 
不起作用,但当我们指定包含在war中的内容css时,我们部署了ckeditor,例如:

CKEDITOR.config.contentsCss = 'http://lvhost:27110/CKEditor/ckeditor/my.css'; 

正如我们所预料的那样
无法在“CKEditor.basepath”之外指定css?

事实上,您无法指定css,因为CKEditor path作用域是名为
CKEditor
的文件夹中的任何内容

但是,您可以通过复制相同的文件夹结构,即
/js/custom\u CKeditor/CKeditor
,使自定义css位于CKeditor的CKeditor之外。我在为CKeditor编写插件时就这样做了

我在
/js/custom\u CKEDITOR/CKEDITOR/plugins/my\u plugin/css/custom.css
上有一个自定义css。在我的
/js/CUSTOM\u CKEDITOR/CKEDITOR/config.js中,我使用了:

CKEDITOR.config.contentsCss=CKEDITOR.plugins.getPath('my_plugin')+'css/custom.css'

作品甜美:)