【问题标题】:Disabled copy and paste after adding wordcount plugin of Ckeditor添加 Ckeditor 的 wordcount 插件后禁用复制和粘贴
【发布时间】:2015-10-29 02:45:29
【问题描述】:

我正在使用 ckeditorwordcount 插件进行字数统计。作为这个插件的要求,我添加了插件'notification'。我的问题是添加通知插件后通过按键复制和粘贴被禁用。我在控制台中收到以下错误: 注意:字数显示正确。

未捕获的类型错误:CKEDITOR.tools.getUniqueId 不是函数 通知@plugin.js?t=E4KA:121(匿名函数)@ plugin.js?t=E4KA:360 我@ckeditor.js:10 CKEDITOR.event.CKEDITOR.event.fire@ckeditor.js:12 CKEDITOR.editor.CKEDITOR.editor.fire @ ckeditor.js:13 f @ ckeditor.js:594(匿名函数)@ckeditor.js:599(匿名 函数)@ckeditor.js:598

我的代码如下添加字数和其他插件:

CKEDITOR.config.extraPlugins = 'toolbar';
CKEDITOR.config.extraPlugins = 'htmlwriter';
CKEDITOR.config.extraPlugins = 'notification';
CKEDITOR.config.extraPlugins = 'wordcount';
CKEDITOR.config.wordcount = {
        showParagraphs: true,
        showWordCount: true,
        countSpacesAsChars: false,
        countHTML: false,
        maxWordCount: 10
};

我在这里做错了什么吗? 请帮帮我。任何帮助将不胜感激。

【问题讨论】:

    标签: notifications ckeditor word-count


    【解决方案1】:

    我遇到了同样的问题。通知插件似乎不适用于低于 4.5 的 CKEditor 版本。所以需要升级CKEditor。您可以在网站上再次构建 CKEditor 包,并将您现在需要的新插件添加到以前的构建配置中 - 字数和通知。

    【讨论】:

      【解决方案2】:

      首先,转换这个`

      CKEDITOR.config.extraPlugins = 'toolbar';
      CKEDITOR.config.extraPlugins = 'htmlwriter';
      CKEDITOR.config.extraPlugins = 'notification';
      CKEDITOR.config.extraPlugins = 'wordcount';
      

      到这里`

      CKEDITOR.config.extraPlugins = 'toolbar,htmlwriter,notification,wordcount';
      

      因为您正在覆盖变量 CKEDITOR.config.extraPlugins

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-07-02
        • 2022-06-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-10-11
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多