百度編輯器去除一些無用標籤方法

2022-02-15 07:23:18 字數 1696 閱讀 8252

1、去掉每個li的中加

的方法:

直接搜尋 //進入編輯器的li要套p標籤

注釋以下**:

//

進入編輯器的li要套p標籤

me.addinputrule(function

(root)elseelse//}

//}//if(tmpp.firstchild() && !tmpp.parentnode || !li.firstchild())

////trace:3357

////p不能為空

//if (!tmpp.firstchild())

////去掉末尾的空白

//var p = li.firstchild();

//var lastchild = p.lastchild();

//if(lastchild && lastchild.type == 'text' && /^\s*$/.test(lastchild.data))

//});

//if(me.options.autotranswordtolist),

//unorderlisttype = ;

//function checklisttype(content,container)//}

//return 'disc'//}

//for(var p in orderlisttype)//}

//}'p'),function(node)

////word貼上過來的會帶有margin要去掉,但這樣也可能會誤命中一些央視

'margin','');

'margin-left','');

'class','');

////

if(list.tagname == 'ol')

//}else

//}else

//var li = ue.unode.createelement('li');

//////}

//var tmp = node,type,cachenode = node;

//if(node.parentnode.tagname != 'li' && (type = checklisttype(node.innertext(),node)))else

//while(node && node.parentnode.tagname != 'li' && checklisttype(node.innertext(),node))

////

node = tmp;//}

//if(!list.parentnode && node && node.parentnode)//}

//var span = cachenode.firstchild();

//if(span && span.type == 'element' && span.tagname == 'span' && /^\s*( )+\s*$/.test(span.innertext()))

//})//}

});

搜尋修改成false:allowdivtranstop: false

再搜尋並修改以下:

//編輯器不能為空內容

if(domutils.isemptynode(me.body))

更改為:

if(domutils.isemptynode(me.body)) 

百度編輯器

jsp引入 src plugin ueditor ueditor.config.js script src plugin ueditor ueditor.all.min.js script js 初始化 function functionloadue 10000 複寫ueditor的getactio...

百度編輯器

檔案上傳,靜態檔案控制位置php config.json 上傳配置項 imageactionname uploadimage 執行上傳的action名稱 imagefieldname upfile 提交的表單名稱 imagemaxsize 2048000,上傳大小限制,單位b 上傳格式顯示 imag...

百度編輯器ueditor

ue information.autoheightenabled true 自適應高度 ue information.autofloatenabled false 編輯器是否固定導航欄 乙個比較簡單好用的修改辦法,就是直接修改ueditor的原始碼,而且是修改此處即可。1 路徑 editor dia...