Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix inconsistent text element color on dark mode while editing. (#2196)

Chrisando Pramudhitae424ca53c6d4
diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx
index 5743a69dcf..1045a5eca9 100644
--- a/src/element/textWysiwyg.tsx
+++ b/src/element/textWysiwyg.tsx
@@ -89,6 +89,9 @@ export const textWysiwyg = ({
editable.dataset.type = "wysiwyg";
// prevent line wrapping on Safari
editable.wrap = "off";
+ editable.className = `excalidraw ${
+ appState.appearance === "dark" ? "Appearance_dark" : ""
+ }`;
Object.assign(editable.style, {
position: "fixed",