Reputation: 23466
I'm using ckeditor
v.4.8.0 included in my project by npm
.
My config looks like this:
CKEDITOR.editorConfig = function (config) {
config.extraPlugins = 'stylesheetparser';
config.contentsCss = '/static/ckeditor/custom/custom_styles.css';
config.stylesSet = 'default';
config.autoGrow_MaxHeight = 500;
};
The file is there and the path is correct, still I my DOM elements in the editor just have the styles defined in contents.css
.
Any ideas what I might be doing wrong?
Upvotes: 1
Views: 1095
Reputation: 359
CKEditor by default uses contents.css which is added via config property - contentsCss.
contentsCss: CKEDITOR.getUrl( 'contents.css' ),
A possible cause could be, you are not passing proper CKEditor.config to the method - CKEDITOR.editorConfig.
How to debug:
config.contentsCss = '/static/ckeditor/custom/custom_styles.css';
You can get more details regarding the configuration: https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-contentsCss
Upvotes: 1