Paragraphs: 0
Words: 0
Characters: 0
Characters (with spaces): 0
bower install --save Countablenpm install --save Countable

The preferred method of installation is either bower or npm. Alternatively, you can download the script directly. Out of the box, Countable can be used with AMD loaders (require.js), CommonJS loaders (node, browserify) or directly in the browser.

Countable offers an easy to understand API. With a single method call you can enable live paragraph-, word- and character-counting on a given HTML element.

var area = document.getElementById('area')

function callback (counter) {
  console.log(counter)
}

Countable.live(area, callback)

There are other methods you can use, all of which are thorougly described in the code itself, as well as in the full documentation.

View the full docs