wysiwyg - How do I get the word count from the TinyMCE editor? -
i have web page several textareas, each uses tinymce editor.
the wordcount plugin shows me word count in bottom right corner of editor. however, need retrieve value editor, not display it.
how ask editor give me word count javascript variable can display outside of editor?
the id of element count called: content-word-count
.
you can value of element in js:
parseint(document.getelementbyid('content-word-count').innerhtml)
or jquery can this:
parseint($('#content-word-count').text())
Comments
Post a Comment