diff options
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 34f03399a..94227a927 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -67,8 +67,6 @@ 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 Select from 'react-select'; // import * as applyDevTools from 'prosemirror-dev-tools'; interface FormattedTextBoxProps extends FieldViewProps { @@ -1201,24 +1199,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB return Doc.NativeAspect(this.Document, this.dataDoc, false) ? this._props.NativeDimScaling?.() || 1 : 1; } - @action - checkBackgroundColor() { - console.log('checking bg color 1'); - if (BoolCast(Doc.UserDoc().settingBgColor)) return; - console.log('checking bg color 2'); - let fontColor = '#000000'; - if (isDarkMode(StrCast(this.Document._backgroundColor))) { - fontColor = '#ffffff'; - } - // set text to white - if (!this._editorView) return; - const tr = this._editorView?.state.tr; - - tr.setSelection(TextSelection.create(tr.doc, 0, tr.doc.content.size)); - tr.addMark(0, tr.doc.content.size, schema.marks.pFontColor.create({ color: fontColor })); - this._editorView.dispatch(tr); - } - componentDidMount() { !this._props.dontSelectOnLoad && this._props.setContentViewBox?.(this); // this tells the DocumentView that this AudioBox is the "content" of the document. this allows the DocumentView to indirectly call getAnchor() on the AudioBox when making a link. this._cachedLinks = LinkManager.Links(this.Document); @@ -1241,10 +1221,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB ({ width, scrollHeight, layout_autoHeight }) => width && layout_autoHeight && this.resetNativeHeight(scrollHeight), { fireImmediately: true } ); - this._disposers.bgColor = reaction( - () => this.Document._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 }), |