convertir <B> a strong y <I> a em

This commit is contained in:
void 2020-11-18 22:37:06 -03:00
parent dbd64457e1
commit 1811c81c0d

View file

@ -336,8 +336,17 @@ function cleanNode (node, contentEl) {
child.parentElement.removeChild(child)
return
} else if (child.tagName === "STYLE") {
return child.parentElement.removeChild(child)
} else if (child.tagName === "B") {
const el = document.createElement("STRONG")
moveChildren(child, el)
child.parentElement.insertBefore(el, child)
child.parentElement.removeChild(child)
} else if (child.tagName === "I") {
const el = document.createElement("EM")
moveChildren(child, el)
child.parentElement.insertBefore(el, child)
child.parentElement.removeChild(child)
return
}
for (const style of Object.values(child.style)) {