This package implements characters count support for CKEditor 5.
This code is a code refactor from Word Count & Char Count Plugin for CKEditor4. This plugin is far from perfect so it is expected to understand the limitations of the features.
- Char Count
- Word Count
- Paragraph Count
To add this feature to your editor, install the ckeditor5-iswordcount package:
npm i ckeditor5-iswordcount
And add it to your plugin list and toolbar configuration:
import ISWordCount from 'ckeditor5-iswordcount';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ ISWordCount, ... ],
toolbar: [ 'iswordcount', ... ]
iswordcount: { maxCharCount: 10, maxHandler: (charCount, maxCharCount) => alert('Reach maximum limit!') }
} )
.then( ... )
.catch( ... );
ckeditor5-iswordcount 5 is an Open Source plugin