From 6c7e97e2aebf79307453bcee94522381ff4c7ba7 Mon Sep 17 00:00:00 2001 From: Sophie Zhang Date: Thu, 7 Dec 2023 00:16:32 -0500 Subject: font color fix --- .../views/nodes/formattedText/FormattedTextBox.tsx | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 6535ac6de..5fdfbce99 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -73,6 +73,7 @@ import applyDevTools = require('prosemirror-dev-tools'); import React = require('react'); import { media_state } from '../AudioBox'; import { setCORS } from 'google-translate-api-browser'; +import { isDarkMode } from '../../../util/reportManager/reportManagerUtils'; // setting up cors-anywhere server address const translate = setCORS('http://cors-anywhere.herokuapp.com/'); export const GoogleRef = 'googleDocId'; @@ -946,13 +947,12 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent width && layout_autoHeight && this.resetNativeHeight(scrollHeight), { fireImmediately: true } ); + this._disposers.width = reaction( + () => this.rootDoc._backgroundColor, + color => this.checkBackgroundColor() + ); this._disposers.componentHeights = reaction( // set the document height when one of the component heights changes and layout_autoHeight is on () => ({ sidebarHeight: this.sidebarHeight, textHeight: this.textHeight, layout_autoHeight: this.layout_autoHeight, marginsHeight: this.layout_autoHeightMargins }), -- cgit v1.2.3-70-g09d2