仿站咨询QQ:2587483189

手机微信同号:15850888840

百度编辑器UEditor超出最大字数后不能完整保存解决方法

 想要实现在达到最大字数的时候,就禁止再继续输入了或者超出字数限制后,不能完整保存内容。

 
查阅很多资料,仿站总结解决方法如下:
 
 
 
第一步:在/include/ueditor/ueditor.all.js中找到这两行注释掉
 
countDom.innerHTML = errMsg;
 
editor.fireEvent(“wordcountoverflow”)
 
 
 
第二步:在注释点的两行下面写上这三行就搞定了
 
var content = editor.getContentTxt();
 
editor.setContent(content.substring(0,max));
 
editor.focus(true);
 

  • 上一篇:dedecms织梦实现样式奇偶循环
  • 下一篇:织梦dedecms首页、列表页调用所有图集方法
  • 来源:未知//所属分类: dede仿站 /更新时间:2018-09-21
    相关仿站教程