【问题标题】:How to change plugin setting dynamically in CKEDITOR?如何在 CKEDITOR 中动态更改插件设置?
【发布时间】:2016-04-08 23:52:57
【问题描述】:

如何在创建 CKEDITOR 实例时动态更改插件的设置?

我写在一个自定义的 config.js 中:

config.wordcount = {
    // Whether or not you want to show the Word Count
    showWordCount: false,
    // Whether or not you want to show the Char Count
    showCharCount: true
};

我想要做的是将maxCharCount 设置为某个值,具体取决于 CKEDITOR 实例。

有没有简单的方法来实现这一点?

【问题讨论】:

    标签: javascript ckeditor word-count


    【解决方案1】:

    找到解决方案:

    CKEDITOR.replace('field', {
        wordcount: {'showWordCount': false,
                    'showParagraphs': false,
                    'showCharCount': true,
                    'maxCharCount': 100
                }
    });
    

    【讨论】:

    • 谢谢!节省了我一点时间
    • 嗨 Kaymaz,我们如何将字体大小选择器添加到 CKEDITOR
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-12
    相关资源
    最近更新 更多