diff --git a/web/editor.js b/web/editor.js index d75ffe235..30732088d 100644 --- a/web/editor.js +++ b/web/editor.js @@ -396,6 +396,9 @@ allowedTagsExtended["FONT"] = {"attrs": ["COLOR"]}; const allowedStyling = { 'color': true, 'background-color': true, + 'font-weight': true, + 'font-style': true, + 'text-decoration-line': true, }; var filterExternalSpan = function(node) { @@ -418,6 +421,10 @@ var filterExternalSpan = function(node) { if (!allowedStyling.hasOwnProperty(name)) { toRemove.push(name); } + if (name === 'background-color' && node.style[name] === "transparent") { + // google docs adds this unnecessarily + toRemove.push(name); + } } for (let name of toRemove) { node.style.removeProperty(name);