1.将 ueditor.all.js文件里的<p> <br/> </p> 所有标签全部删除
2.找到 ueditor.all.js文件里的
01//给文本或者inline节点套p标签
02
03 if (me.options.enterTag == 'p') {
04
05 var child = this.body.firstChild, tmpNode;
06
07 if (!child || child.nodeType == 1 &&
08
09 (dtd.$cdata[child.tagName] || isCdataDiv(child) ||
10
11 domUtils.isCustomeNode(child)
12
13 )
14
15 && child === this.body.lastChild) {
16
17 this.body.innerHTML = '<div>' + (browser.ie ? ' ' : '<br/>') + '</div>' + this.body.innerHTML;
18
19 } else {
20
21 var p = me.document.createElement('div');
22
23 while (child) {
24
25 while (child && (child.nodeType == 3 || child.nodeType == 1 && dtd.p[child.tagName] && !dtd.$cdata[child.tagName])) {
26
27 tmpNode = child.nextSibling;
28
29 p.appendChild(child);
30
31 child = tmpNode;
32
33 }
34
35 if (p.firstChild) {
36
37 if (!child) {
38
39 me.body.appendChild(p);
40
41 break;
42
43 } else {
44
45 child.parentNode.insertBefore(p, child);
46
47 p = me.document.createElement('div');
48
49 }
50
51 }
52
53 child = child.nextSibling;
54
55 }
56
57 }
58
59 }
这一段,把里面的单独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 (图集模型)
转自:https://www.eyoucms.com/help/eyoujq/3645.html