+ _getCount : function(ed) {\r
+ var tc = 0;\r
+ var tx = ed.getContent({ format: 'raw' });\r
+\r
+ if (tx) {\r
+ tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces\r
+ tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars\r
+\r
+ // deal with html entities\r
+ tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' ');\r
+ tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation\r
+\r
+ var wordArray = tx.match(this.countre);\r
+ if (wordArray) {\r
+ tc = wordArray.length;\r
+ }\r
+ }\r
+\r
+ return tc;\r
+ },\r
+\r