5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 22:56:21 +00:00

Merge branch 'editor-en-webpack' of 0xacab.org:sutty/sutty into editor-en-webpack

This commit is contained in:
f 2021-02-02 16:53:00 -03:00
commit 8f72f7cc17

View file

@ -265,7 +265,10 @@ const cleanContent = (contentEl) => {
if (elementIsParentBlock(child)) { if (elementIsParentBlock(child)) {
cleanContent(child) cleanContent(child)
} else if (!elementIsBlock(child)) { } else if (!elementIsBlock(child)) {
child.tagName = "P" const el = document.createElement("p")
moveChildren(child, el, null)
contentEl.insertBefore(el, child)
child.parentNode.removeChild(child)
} }
} else if (child.nodeType === Node.TEXT_NODE) { } else if (child.nodeType === Node.TEXT_NODE) {
const el = document.createElement("p") const el = document.createElement("p")