编辑器插入外链无反应bug修复

This commit is contained in:
devil_gong 2019-08-21 21:15:17 +08:00
parent c2db6075cb
commit 637b1746a0
3 changed files with 14 additions and 12 deletions

View File

@ -133,7 +133,7 @@
'border': $G('border'),
'vhSpace': $G('vhSpace'),
'title': $G('title'),
'align': $G('align')
'align': 'none'
};
var img = editor.selection.getRange().getClosedNode();
if (img) {

View File

@ -776,7 +776,7 @@ i.file-preview.file-type-psd{
height: 315px;
}
#videoUrl {
width: auto;
width: calc(100vw - 92px);
}
#preview {
width: calc(100% - 150px);

View File

@ -11020,18 +11020,20 @@ UE.commands['imagefloat'] = {
me.execCommand('insertHtml', '<p id="_img_parent_tmp" style="text-align:center">' + pN.innerHTML + '</p>');
tmpNode = me.document.getElementById('_img_parent_tmp');
tmpNode.removeAttribute('id');
tmpNode = tmpNode.firstChild;
range.selectNode(tmpNode).select();
//去掉后边多余的元素
next = tmpNode.parentNode.nextSibling;
if (next && domUtils.isEmptyNode(next)) {
domUtils.remove(next);
tmpNode = me.document.getElementById('_img_parent_tmp') || null;
if(tmpNode != null)
{
tmpNode.removeAttribute('id');
tmpNode = tmpNode.firstChild;removeAttribute
range.selectNode(tmpNode).select();
//去掉后边多余的元素
next = tmpNode.parentNode.nextSibling;
if (next && domUtils.isEmptyNode(next)) {
domUtils.remove(next);
}
}
}
break;
}