具体解决方案如下
ueditor.all.js中找到 UE.Editor.defaultOptions 在最后的返回对象中加入: allowDivTransToP: false, disabledTableInTable: true
前端插入html标签的写法
var templates = '<a class="ygCmsTemplate" dataType="Commodity" dataId="{0}" dataCode={1}" href="#">\
<img src="{3}" style="max-width:560px" alt=""/>\
<h5>{2}</h5>\
</a>';
var insertHtml = format(templates, selectedCommoditys);
var ue = UE.getEditor('editorEfruitArticleContent');
ue.execCommand("inserthtml", insertHtml, true)