This plugin adds word count functionality to TinyMCE, placing a counter on the right edge of the status bar.
Type: String
Example
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "wordcount"
});
Options
These settings affect the execution of the wordcount
plugin. The regular expression values that determine how words are cleaned and counted may be set here.
wordcount_cleanregex
This option allows you to specify the regular expression that will be used to strip punctuation and numbers from the word count. Removed in 4.5.0
Type: String
Example
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "wordcount",
wordcount_cleanregex: /[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g
});
wordcount_countregex
This option allows you to specify the regular expression that will be used to count the words for the word count. Removed in 4.5.0
Type: String
Example
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "wordcount",
wordcount_countregex: /[\w\u2019\x27\-\u00C0-\u1FFF]+/g
});
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.