public/js/ckeditor/plugins/charcount/plugin.js
/**
 * This performs the necessary character or word calculation and display
 * @param {CKEDITOR} editor <p>The editor that you wish to count.</p>
 */
This performs the necessary character or word calculation and display
@param {CKEDITOR} editor The editor that you wish to count.
This performs the necessary character or word calculation and display @param { CKEDITOR } editor The editor that you wish to count .
function calculate(editor) {
	var buttonLabel = document.getElementById('cke_' + editor.name).getElementsByClassName('cke_button__charcount_label')[0],
		plainText = editor.document.getBody().getText().replace(/^\s+|\s+$/g, '');
	if (editor.config.maxLength != null) {
		if (editor.config.maxLength == 0)
			buttonLabel.innerHTML = plainText.length;
		else
			buttonLabel.innerHTML = editor.config.maxLength - plainText.length
	} else {
		if (editor.config.maxWords == 0)
			buttonLabel.innerHTML = wordCount(plainText);
		else
			buttonLabel.innerHTML = editor.config.maxWords - wordCount(plainText);
	}
}
function calculate ( editor ) { var buttonLabel = document . getElementById ( 'cke_' + editor . name ) . getElementsByClassName ( 'cke_button__charcount_label' ) [ 0 ] , plainText = editor . document . getBody ( ) . getText ( ) . replace ( / ^\s+|\s+$ / g , '' ) ; if ( editor . config . maxLength != null ) { if ( editor . config . maxLength == 0 ) buttonLabel . innerHTML = plainText . length ; else buttonLabel . innerHTML = editor . config . maxLength - plainText . length } else { if ( editor . config . maxWords == 0 ) buttonLabel . innerHTML = wordCount ( plainText ) ; else buttonLabel . innerHTML = editor . config . maxWords - wordCount ( plainText ) ; } }
This performs the necessary character or word calculation and display
 @param {CKEDITOR} editor <p>The editor that you wish to count.</p>
This performs the necessary character or word calculation and display @param { CKEDITOR } editor <p > The editor that you wish to count . < / p >
// Character count // Word count