如何让eyou(百度编辑器)内容不自动加上p标签后缀 |
您所在的位置:网站首页 › 小薇ie › 如何让eyou(百度编辑器)内容不自动加上p标签后缀 |
1.将 ueditor.all.js文件里的 所有标签全部删除
2.找到 ueditor.all.js文件里的 //给文本或者inline节点套p标签if (me.options.enterTag == 'p') {var child = this.body.firstChild, tmpNode;if (!child || child.nodeType == 1 &&(dtd.$cdata[child.tagName] || isCdataDiv(child) ||domUtils.isCustomeNode(child))&& child === this.body.lastChild) {this.body.innerHTML = '' + (browser.ie ? ' ' : '') + '' + this.body.innerHTML;} else {var p = me.document.createElement('div');while (child) {while (child && (child.nodeType == 3 || child.nodeType == 1 && dtd.p[child.tagName] && !dtd.$cdata[child.tagName])) {tmpNode = child.nextSibling;p.appendChild(child);child = tmpNode;}if (p.firstChild) {if (!child) {me.body.appendChild(p);break;} else {child.parentNode.insertBefore(p, child);p = me.document.createElement('div');}}child = child.nextSibling;}}} 这一段,把里面的单独p文字全部删掉或者注释掉
3.ueditor.all.js文件里的 allowDivTransToP:true 把true改成false
4、注视掉这段
node.className = utils.trim(node.className.replace(/list-paddingleft-\w+/,'')) + ' list-paddingleft-' + type;
5、最后注视掉:
li.style.cssText && (li.style.cssText = '');
6.所有引用文件里的ueditor.all.min.js全改成ueditor.all.js
7.替换的文件路径为 /application/admin/template/article (文章模型) /application/admin/template/images (图集模型)
转自:http://www.eyoucms.com/help/eyoujq/3645.html |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |