diff --git a/app/assets/javascripts/02-editor.js b/app/assets/javascripts/02-editor.js index e5a417c5..20225c18 100644 --- a/app/assets/javascripts/02-editor.js +++ b/app/assets/javascripts/02-editor.js @@ -376,16 +376,16 @@ function cleanNode (node, contentEl) { child.parentElement.removeChild(child) } - for (const style of Object.values(child.style)) { - const value = child.style[style] + child.style.forEach(prop => { + const value = child.style[prop] - switch (style) { + switch (prop) { case 'background-color': - if (child.tagName === "MARK") break + if (child.tagName === "MARK") return default: - child.style[style] = "" + child.style[prop] = "" } - } + }) } cleanNode(child, contentEl) }