We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e93d05 commit 8ac4dd3Copy full SHA for 8ac4dd3
1 file changed
client/src/app/ui/modules/editor/components/editor/extensions/clear-textcolor.ts
@@ -21,9 +21,13 @@ const ClearTextcolorPastePlugin = new Plugin({
21
continue;
22
}
23
24
- const isTextBlack = !el.style.color || tinycolor(el.style.color).toHex() === `000000`;
25
- const isBgWhite = !el.style.backgroundColor || tinycolor(el.style.backgroundColor).toHex() === `ffffff`;
26
- if (isTextBlack && isBgWhite) {
+ const textColor = !el.style.color || tinycolor(el.style.color).toHex();
+ const bgColor = !el.style.backgroundColor || tinycolor(el.style.backgroundColor).toHex();
+
27
+ if (
28
+ (textColor === `000000` && bgColor === `ffffff`) ||
29
+ (textColor === `ffffff` && bgColor === `424242`)
30
+ ) {
31
el.style.color = ``;
32
el.style.backgroundColor = ``;
33
0 commit comments