想要實(shí)現(xiàn)在達(dá)到最大字?jǐn)?shù)的時候,就禁止再繼續(xù)輸入了或者超出字?jǐn)?shù)限制后,不能完整保存內(nèi)容。
查閱很多資料,織夢58總結(jié)解決方法如下:
第一步:在/include/ueditor/ueditor.all.js中找到這兩行注釋掉
countDom.innerHTML = errMsg;
editor.fireEvent(“wordcountoverflow”)
第二步:在注釋點(diǎn)的兩行下面寫上這三行就搞定了
var content = editor.getContentTxt();
editor.setContent(content.substring(0,max));
editor.focus(true);