TinyMCE, show character count instead of word count

Rusty picture Rusty · Dec 27, 2015 · Viewed 12.6k times · Source

The title says it all. How do I get TinyMCE to show character count instead of word count?

enter image description here

Answer

Mikhail Gerasimov picture Mikhail Gerasimov · Jul 25, 2019

wordcount plugin now can count and show characters:

Clicking Word Count in the status bar switches between counting words and characters.

By default mode is "words", but it's pretty easy emulate click in status bar to switch it.

Alter your editor config following way:

tinymce.init({
   plugins: "wordcount",

   // ... 

   init_instance_callback: function (editor) {
      $(editor.getContainer()).find('button.tox-statusbar__wordcount').click();  // if you use jQuery
   }
});

That's all. You have character count now.