/**
* 計算編輯器當前內容的長度
* @name getContentLength
* @grammar editor.getContentLength(ingoneHtml,tagNames) =>
* @example
* editor.getLang(true)
*
* 2013年7月1日16:53:15 注釋掉的內容為 去除html標記后的內容數,實際入庫是算上html標簽和文字的 所以統計字數以getContents為準
*/
getContentLength: function (ingoneHtml, tagNames) {
var count = this.getContent(false,false,true).length;
/*if (ingoneHtml) {
tagNames = (tagNames || []).concat([ 'hr', 'img', 'iframe']);
count = this.getContentTxt().replace(/[\t\r\n]+/g, '').length;
for (var i = 0, ci; ci = tagNames[i++];) {
count += this.document.getElementsByTagName(ci).length;
}
}*/
return count;
},