手机
当前位置:查字典教程网 >编程开发 >网页编辑器 >百度UEditor修改右下角统计字数包含html样式
百度UEditor修改右下角统计字数包含html样式
摘要:百度UEditor修改右下角统计字数默认只统计前台所见的文字个数,为了便于展示实际保存的时候是保存的包含html标签的,所以右下角的统计字数...

百度UEditor修改右下角统计字数默认只统计前台所见的文字个数,为了便于展示实际保存的时候是保存的包含html标签的,所以右下角的统计字数功能需要修改

/** * 计算编辑器当前内容的长度 * @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(/[trn]+/g, '').length; for (var i = 0, ci; ci = tagNames[i++];) { count += this.document.getElementsByTagName(ci).length; } }*/ return count; },

找到ueditor.all.js这个文件 找到4944行到4951行 注释掉 就ok了

【百度UEditor修改右下角统计字数包含html样式】相关文章:

fckeditor 修改记录添加行距功能插件

dedecms ckeditor编辑器添加链接默认新窗口打开的修改方法

页面上存在多个FckEditor编辑器的验证方法

网页编辑器FCKeditor 2.6.4精简配置方法

fckeditor常用Js,获取fckeditor内容,统计fckeditor字数,向fckeditor写入指定代码

asp.net FCKeditor 2.6.3 配置说明

百度UEditor编辑器使用教程与使用方法(图文)

彻底解决ewebeditor网站后台不能上传图片的方法

TinyMCE syntaxhl插入代码后换行的修改方法

自己打造HTML在线编辑器的实现难点分析

精品推荐
分类导航