Days
Hours
Minutes
Seconds
x

New Froala Editor v4.3.1 is here – Learn More

Skip to content

Word Counter Plugin

Display the word count at the bottom bar of the editor. It will be updated with each word you add or remove. It also enables you to restrict the number of words a user can input in the editor.


Plugin options:

wordCounterCount
Boolean - Default: True
Enables or disables the display of the word counter.
wordCounterMax
Number - Default: -1
The maximum number of words allowed to be inserted into the rich text editor. -1 indicates that no limit has been set.

Plugin methods:

wordCounter.wordCount()
returns: Integer
Returns the number of words in the editor.

Plugin events:

wordCounter.exceeded ()
Triggered when the maximum word count is exceeded.
wordCounter.update () Triggered when the user updates the editor content.

Add Plugin to your code:

Plugin name: wordCounter

Plugin JS Script: ../js/plugins/word_counter.min.js

Or from CDN https://cdn.jsdelivr.net/npm/froala-editor@latest/js/plugins/word_counter.min.js


Example :

Try the Word Counter plugin here.

Interactive Demo