diff --git a/qt/ts/src/editor.ts b/qt/ts/src/editor.ts index 7486fccc5..e0cf8709b 100644 --- a/qt/ts/src/editor.ts +++ b/qt/ts/src/editor.ts @@ -464,6 +464,10 @@ const allowedStyling = { "text-decoration-line": true, }; +let isNightMode = function(): boolean { + return document.body.classList.contains("nightMode"); +}; + let filterExternalSpan = function(node) { // filter out attributes let toRemove = []; @@ -486,6 +490,12 @@ let filterExternalSpan = function(node) { // google docs adds this unnecessarily toRemove.push(name); } + if (isNightMode()) { + // ignore coloured text in night mode for now + if (name === "background-color" || name == "color") { + toRemove.push(name); + } + } } for (let name of toRemove) { node.style.removeProperty(name);