From 70cf5ad795055c1f628c918b08a13a96e4ab89a6 Mon Sep 17 00:00:00 2001
From: Sophie Zhang <sophie_zhang@brown.edu>
Date: Wed, 7 Feb 2024 19:08:38 -0500
Subject: saving prog

---
 src/client/views/nodes/formattedText/FormattedTextBox.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')

diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index f9cef1a60..460f2a1c6 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -67,6 +67,7 @@ import { RichTextMenu, RichTextMenuPlugin } from './RichTextMenu';
 import { RichTextRules } from './RichTextRules';
 import { schema } from './schema_rts';
 import { SummaryView } from './SummaryView';
+import { isDarkMode } from '../../../util/reportManager/reportManagerUtils';
 // import * as applyDevTools from 'prosemirror-dev-tools';
 @observer
 export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps>() implements ViewBoxInterface {
@@ -1153,7 +1154,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
         if (BoolCast(Doc.UserDoc().settingBgColor)) return;
         console.log('checking bg color 2');
         let fontColor = '#000000';
-        if (isDarkMode(StrCast(this.rootDoc._backgroundColor))) {
+        if (isDarkMode(StrCast(this.Document._backgroundColor))) {
             fontColor = '#ffffff';
         }
         // set text to white
@@ -1188,7 +1189,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
             { fireImmediately: true }
         );
         this._disposers.bgColor = reaction(
-            () => this.rootDoc._backgroundColor,
+            () => this.Document._backgroundColor,
             color => this.checkBackgroundColor()
         );
         this._disposers.componentHeights = reaction(
-- 
cgit v1.2.3-70-g09d2

