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:
commit
8f72f7cc17
1 changed files with 4 additions and 1 deletions
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue