mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-03 20:39:59 +08:00
编辑器插入外链无反应bug修复
This commit is contained in:
parent
c2db6075cb
commit
637b1746a0
@ -133,7 +133,7 @@
|
|||||||
'border': $G('border'),
|
'border': $G('border'),
|
||||||
'vhSpace': $G('vhSpace'),
|
'vhSpace': $G('vhSpace'),
|
||||||
'title': $G('title'),
|
'title': $G('title'),
|
||||||
'align': $G('align')
|
'align': 'none'
|
||||||
};
|
};
|
||||||
var img = editor.selection.getRange().getClosedNode();
|
var img = editor.selection.getRange().getClosedNode();
|
||||||
if (img) {
|
if (img) {
|
||||||
|
@ -776,7 +776,7 @@ i.file-preview.file-type-psd{
|
|||||||
height: 315px;
|
height: 315px;
|
||||||
}
|
}
|
||||||
#videoUrl {
|
#videoUrl {
|
||||||
width: auto;
|
width: calc(100vw - 92px);
|
||||||
}
|
}
|
||||||
#preview {
|
#preview {
|
||||||
width: calc(100% - 150px);
|
width: calc(100% - 150px);
|
||||||
|
@ -11020,18 +11020,20 @@ UE.commands['imagefloat'] = {
|
|||||||
|
|
||||||
me.execCommand('insertHtml', '<p id="_img_parent_tmp" style="text-align:center">' + pN.innerHTML + '</p>');
|
me.execCommand('insertHtml', '<p id="_img_parent_tmp" style="text-align:center">' + pN.innerHTML + '</p>');
|
||||||
|
|
||||||
tmpNode = me.document.getElementById('_img_parent_tmp');
|
tmpNode = me.document.getElementById('_img_parent_tmp') || null;
|
||||||
tmpNode.removeAttribute('id');
|
if(tmpNode != null)
|
||||||
tmpNode = tmpNode.firstChild;
|
{
|
||||||
range.selectNode(tmpNode).select();
|
tmpNode.removeAttribute('id');
|
||||||
//去掉后边多余的元素
|
tmpNode = tmpNode.firstChild;removeAttribute
|
||||||
next = tmpNode.parentNode.nextSibling;
|
|
||||||
if (next && domUtils.isEmptyNode(next)) {
|
range.selectNode(tmpNode).select();
|
||||||
domUtils.remove(next);
|
//去掉后边多余的元素
|
||||||
|
next = tmpNode.parentNode.nextSibling;
|
||||||
|
if (next && domUtils.isEmptyNode(next)) {
|
||||||
|
domUtils.remove(next);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user