Closed jackyGang closed 5 years ago
paragraph.js文件中的domUtils.remove(para.parentNode, true);改为domUtils.remove(para, true); //trace:1706 选择的就是h1-6要删除 if ( attrs && /h\d/i.test(parent.tagName) && !/h\d/i.test(para.tagName) ) { domUtils.setAttributes(parent, attrs); if ( sourceCmdName && sourceCmdName == "customstyle" && attrs.style ) { parent.style.cssText = attrs.style; } domUtils.remove(para, true); para = parent; } else { domUtils.remove(para.parentNode, true); } }
//trace:1706 选择的就是h1-6要删除 if ( attrs && /h\d/i.test(parent.tagName) && !/h\d/i.test(para.tagName) ) { domUtils.setAttributes(parent, attrs); if ( sourceCmdName && sourceCmdName == "customstyle" && attrs.style ) { parent.style.cssText = attrs.style; } domUtils.remove(para, true); para = parent; } else { domUtils.remove(para.parentNode, true); } }
方便提交个PR 么
paragraph.js文件中的domUtils.remove(para.parentNode, true);改为domUtils.remove(para, true);
//trace:1706 选择的就是h1-6要删除 if ( attrs && /h\d/i.test(parent.tagName) && !/h\d/i.test(para.tagName) ) { domUtils.setAttributes(parent, attrs); if ( sourceCmdName && sourceCmdName == "customstyle" && attrs.style ) { parent.style.cssText = attrs.style; } domUtils.remove(para, true); para = parent; } else { domUtils.remove(para.parentNode, true); } }