Taj Mahal is a mausoleum built in Agra between 1631 and 1648 by Emperor Shah Jahan in the memory of his beloved wife, Mumtaz Mahal, whose body lies there. It took 20 000 workers to complete and the excellence of this building is visible in every brick.

In 1983, Taj Mahal was appointed UNESCO World Heritage Site for being “the jewel of Muslim art in India and one of the universally admired masterpieces of the world's heritage”.

The example above was created by using the following HTML page structure:

<divid="editor"><p>Hello world.</p></div><divid="word-count"></div>

You can use the code below to set up the WYSIWYG editor with the word and character count features as in the example above.

Note: For performance reasons, your callback will be throttled and may not be up–to–date. Use the characters and words plugin properties to retrieve the precise numbers on demand.

Below you can play with a demo post editor with a soft 120 characters limit and a progress chart below indicating how many characters are in the content. The progress chart changes its color as the limit is near or exceeded. Type in the editor to see the feature in action. See the code used to create the demo listed below in this section.

Post editor with word count

Tourists frequently admit that Taj Mahal “simply cannot be described with words”.

Note: For performance reasons, the update event is throttled so the statistics may not be up–to–date. Use the characters and words plugin properties to retrieve the precise numbers on demand.

The characters and words properties from which you can retrieve the stats at any moment.

We recommend using the official CKEditor 5 inspector for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.