npm.io
0.0.6 • Published 7 years ago

ckeditor5-iswordcount

Licence
MIT
Version
0.0.6
Deps
0
Size
17 kB
Vulns
0
Weekly
0
Stars
2

ckeditor5-iswordcount Tweet

npm version npm download npm license

This package implements characters count support for CKEditor 5.

alt text

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.

Feature

  • Char Count
  • Word Count
  • Paragraph Count

Installation

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( ... );

License

ckeditor5-iswordcount 5 is an Open Source plugin

Keywords