百度UEditor修改右下角統(tǒng)計(jì)字?jǐn)?shù)包含html樣式
百度UEditor修改右下角統(tǒng)計(jì)字?jǐn)?shù)默認(rèn)只統(tǒng)計(jì)前臺(tái)所見的文字個(gè)數(shù),為了便于展示實(shí)際保存的時(shí)候是保存的包含html標(biāo)簽的,所以右下角的統(tǒng)計(jì)字?jǐn)?shù)功能需要修改
/**
* 計(jì)算編輯器當(dāng)前內(nèi)容的長(zhǎng)度
* @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í)際入庫(kù)是算上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)文章
FCKeditor 2.6 編碼錯(cuò)誤導(dǎo)致修改的內(nèi)容出現(xiàn)亂碼的解決方法
我修改了該文件,其中有些中文字,在 IE 中打開之,發(fā)現(xiàn)是亂碼,原來這個(gè)文件有問題。文件中指定了 charset 為 utf-82010-03-03
eWebEditor 輯器按鈕失效 IE8下eWebEditor編輯器無(wú)法使用的解決方法
最近我把IE瀏覽器更新到了IE8.0,在用eWebEditor在線HTML文本編輯器的時(shí)候點(diǎn)擊eWebEditor上的所有編輯按鈕都沒用,只看到瀏覽器狀態(tài)欄左下角顯示網(wǎng)頁(yè)上有錯(cuò)誤,于是上網(wǎng)查了一下。終于找到解決的方法,測(cè)試后正常。2009-06-06
ueditor1.2.1修改超鏈接默認(rèn)值,ueditor編輯器新窗口打開連接
這篇文章主要介紹了ueditor1.2.1修改超鏈接默認(rèn)值,ueditor編輯器新窗口打開連接的設(shè)置方法2014-07-07
解密FCKeditor 2.0 的設(shè)置.修改.使用方法
解密FCKeditor 2.0 的設(shè)置.修改.使用方法...2007-11-11

