gpt4 book ai didi

javascript - 如何在 CKEDITOR 中动态更改插件设置?

转载 作者:行者123 更新时间:2023-11-29 21:36:57 25 4
gpt4 key购买 nike

当创建 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
};

我想做的是根据 CKEDITOR 实例将 maxCharCount 设置为某个值。

有没有简单的方法可以做到这一点?

最佳答案

找到解决方案:

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

关于javascript - 如何在 CKEDITOR 中动态更改插件设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34606896/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com