使用charcount插件的Ckeditor字符限制

如何达到最大字符限制 阻止用户输入新字符?

Ckeditor charcount插件只显示剩余的字符,我希望它停在0.但它会减去整数。

这是我的HTML代码。

  CKEDITOR.replace('myTextEditor1', { height: 200, extraPlugins: 'charcount', maxLength: 10, toolbar: 'TinyBare', toolbar_TinyBare: [ ['Bold','Italic','Underline'], ['Undo','Redo'],['Cut','Copy','Paste'], ['NumberedList','BulletedList','Table'],['CharCount'] ] });  

我必须使用onChange插件吗? 如果我必须如何限制用户输入新字符?

我使用了ckeditor jQuery适配器。

   

keyCode检查是允许退格和删除按键。 要使用jQuery适配器,请不要忘记插入它: