样式未加载到CKEditor插件中 [英] Style not loaded in CKEditor plugin

查看:69
本文介绍了样式未加载到CKEditor插件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发CKEditor小部件.我遵循并改编了

但该页面未加载它:

我可以单击控制台中CSS所示的路径,并且该路径已正确显示.该文件的权限是正确的-等于已加载文件的权限.我还能检查什么?

解决方案

好吧,找到解决方案后,这很明显–问题还在于,当我仍然没有CKEditor的经验时,我就下载了自定义软件包,然后很快忘记了发生了什么,然后有罪的插件没有出现在优化软件包的 plugins/中.这是 divarea ,其描述明确指出:

此插件使用一个元素(而不是传统元素)作为主题编辑器中的可编辑区域.与内联编辑非常相似,它可以使编辑器内容继承自宿主页面样式,从而受益匪浅.

没有此插件,即使未考虑给定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?

解决方案

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).

这篇关于样式未加载到CKEditor插件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆