开发者

Problem attaching stylesheet to CKEditor

开发者 https://www.devze.com 2023-03-11 21:32 出处:网络
I\'ve got a config.js file that looks like: CKEDITOR.editorConfig = function( config ) { config.stylesSet = \'custom:/themes/custom.js\';

I've got a config.js file that looks like:

CKEDITOR.editorConfig = function( config )
{
  config.stylesSet = 'custom:/themes/custom.js';
  config.contentsCss = '/assets/css/master.css';
};

I can see the styles that I've defined in my custom.js in CKEditor's styles dropdown, but when I apply them to elements in the WYSIWYG editor, the styles don't show in the editor, but they do when the entry is published. Is there 开发者_Python百科something else I'm missing? :?


I may be wrong but I believe that path is relevant to the html (or php) file displaying the page and not the js file.

I use CKEditor and had to do this with images but not css. let me know if it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消