This plugin inserts a new "button" into a toolbar that contains the current character or word count of an editor. The plugin is dependent upon your browser supporting the document.getElementsByClassName method but otherwise works out of the box. I would recommend that you ensure your CKEditor build contains the Paste As Plain Text build plugin as this exposes the paste event. Without this pasting text will not update the count correctly.
To activate the plugin you must include this plugin - "charcount" and pass config.maxLength or config.maxWords to CKEditor as an integer value. If maxLength or maxWords is 0 (zero) then this plugin will display the pure character/word count, if any positive value is passed then it will display the number of "remaining" characters or words. This counter is purely informational and does not actually restrict entry in any way.
Please read readme.md for examples on how to use this.
The recommended way to install all CKEditor add-ons is to create a custom build by using Online builder. To do that, click the Add to my editor button on the plugin page. When you are done, click the Build my editor button on the right side of the page to go to Online builder.
Note: This add-on is already selected to be a part of your current build.
Add-on installation instructions
If you want to add the plugin manually, you will need to:
- Extract the downloaded plugin
pluginsfolder of your CKEditor installation. Example:
- Enable the plugin by using the
extraPluginsconfiguration setting. Example:
config.extraPlugins = 'charcount';
- Download and configure all its dependencies, too.
No additional dependencies.
Note: The plugin may have additional requirements. Check the add-on page and documentation for more details.