【问题标题】:How to use wordcount with CDN ckeditor?如何在 CDN ckeditor 中使用 wordcount?
【发布时间】:2016-09-02 06:30:52
【问题描述】:

为什么这不起作用?

<script src="//cdn.ckeditor.com/4.5.8/standard/ckeditor.js"></script>
<script>
    CKEDITOR.plugins.addExternal('wordcount', '/assets/ckeditor/plugins/wordcount/', 'plugin.js');
    CKEDITOR.replace('body', {
        extraPlugins: 'wordcount',
        customConfig: '/assets/js/ckeditor/config.js'
    });
</script>

在我的网站上,我的 wordcount 插件托管在(猜一猜)

mydomain.com/assets/ckeditor/plugins/wordcount/plugin.js

我得到的错误:

GET http://cdn.ckeditor.com/404.shtml/ net::ERR_TOO_MANY_REDIRECTS 未捕获的错误:[CKEDITOR.resourceManager.load] 在“http://cdn.ckeditor.com/4.5.8/standard/plugins/notification/plugin.js?t=G2VC”中找不到资源名称“通知”

【问题讨论】:

    标签: javascript ckeditor ckeditor-wordcount


    【解决方案1】:

    根据他们在https://cdn.ckeditor.com/ 的文档,“标准”预设不包含任何其他插件,您必须将路径切换到“标准全部”,以便其余插件存在。

    对我来说,这是他们方面的一个错误,因为如果在两种情况下加载的文件相同,我看不到使用“标准”而不是“标准全部”的任何优势,但缺点是它会如果您尝试使用任何其他插件,则会失败。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-21
      • 2011-06-15
      • 1970-01-01
      • 1970-01-01
      • 2020-03-11
      • 2021-12-10
      相关资源
      最近更新 更多