convertir <B> a strong y <I> a em
This commit is contained in:
parent
dbd64457e1
commit
1811c81c0d
1 changed files with 10 additions and 1 deletions
|
@ -336,8 +336,17 @@ function cleanNode (node, contentEl) {
|
||||||
child.parentElement.removeChild(child)
|
child.parentElement.removeChild(child)
|
||||||
return
|
return
|
||||||
} else if (child.tagName === "STYLE") {
|
} 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)
|
child.parentElement.removeChild(child)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const style of Object.values(child.style)) {
|
for (const style of Object.values(child.style)) {
|
||||||
|
|
Loading…
Reference in a new issue