Style not loaded in CKEditor plugin

假如想象 提交于 2019-12-24 10:24:43

问题


I am developing a CKEditor widget. I followed and adapted the widget tutorial, then tried to add a style using addContentsCss, as specified in the plugin sdk styles, but the styles are not loaded. I used the browser console to analyze the situation, and I found out that my style, odtbox.css, is present in CKEDITOR.instances.editor.config.contentsCss:

but it is not loaded by the page:

I can click on the path shown in the console for my css and it is correctly shown. Permissions for the file are correct - they are equal to those of the files that are loaded. What else can I check?


回答1:


Well, after finding the solution, it was quite obvious – the problem was also that I had dowoloaded my custom bundle when I still had no experience with CKEditor, and then quickly forgot what had happened, and then the guilty plugin did not appear in plugins/ for the optimized package. It was divarea, whose description clearly states:

This plugin uses a element (instead of the traditional element) as the editable area in the themedui creator. Much similar to inline editing, it benefits from allowing the editor content to inherit from host page styles.

Without this plugin, styles are correctly applied, even without taking into account the solution to a similar problem given here; I guess that depends on the specific version, I am using the latest version of ckeditor 4 available at the moment (4.11.1).



来源:https://stackoverflow.com/questions/53906416/style-not-loaded-in-ckeditor-plugin

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