欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

百度UEditor修改右下角統(tǒng)計(jì)字?jǐn)?shù)包含html樣式

 更新時(shí)間:2014年07月23日 17:55:11   投稿:whsnow  
百度UEditor修改右下角統(tǒng)計(jì)字?jǐn)?shù)默認(rèn)只統(tǒng)計(jì)前臺所見的文字個(gè)數(shù),如何讓右下角統(tǒng)計(jì)字?jǐn)?shù)包含html樣式,需要的朋友可以參考下

百度UEditor修改右下角統(tǒng)計(jì)字?jǐn)?shù)默認(rèn)只統(tǒng)計(jì)前臺所見的文字個(gè)數(shù),為了便于展示實(shí)際保存的時(shí)候是保存的包含html標(biāo)簽的,所以右下角的統(tǒng)計(jì)字?jǐn)?shù)功能需要修改

/**
* 計(jì)算編輯器當(dāng)前內(nèi)容的長度
* @name getContentLength
* @grammar editor.getContentLength(ingoneHtml,tagNames) =>
* @example
* editor.getLang(true)
* 
* 2013年7月1日16:53:15 注釋掉的內(nèi)容為 去除html標(biāo)記后的內(nèi)容數(shù),實(shí)際入庫是算上html標(biāo)簽和文字的 所以統(tǒng)計(jì)字?jǐn)?shù)以getContents為準(zhǔn)
*/
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;

},

找到ueditor.all.js這個(gè)文件 找到4944行到4951行 注釋掉 就ok了

相關(guān)文章

最新評論