catdown-wordcount
v1.0.0
Published
Catdown plugin. Emits a 'wordcount' event with a number and a pluralised string every time the editor is changed.
Readme
catdown-wordcount
Catdown plugin. Emits a "wordcount" event with a number and a pluralised string every time the editor is changed.
Usage
Install with npm.
$ npm install --save catdown-wordcountuse it on your Catdown editor.
editor.use(require("catdown-wordcount"));Then bind some events to it.
editor.on("wordcount", function(num, msg){
// num === 2
// msg === "2 words"
});