diff options
| author | bobzel <zzzman@gmail.com> | 2023-12-10 20:19:27 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-12-10 20:19:27 -0500 |
| commit | 380ee1acac1c0b7972d7d423cf804af146dc0edf (patch) | |
| tree | 1d77244a600e6eb1fb6d56356b3ce01ca6add89d /src/client/views/nodes/formattedText/EquationEditor.tsx | |
| parent | b7b7105fac83ec11480204c5c7ac0ae6579774e1 (diff) | |
massive changes to use mobx 6 which means not accessing props directly in @computed functions.
Diffstat (limited to 'src/client/views/nodes/formattedText/EquationEditor.tsx')
| -rw-r--r-- | src/client/views/nodes/formattedText/EquationEditor.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/formattedText/EquationEditor.tsx b/src/client/views/nodes/formattedText/EquationEditor.tsx index bde6c1315..07c70af77 100644 --- a/src/client/views/nodes/formattedText/EquationEditor.tsx +++ b/src/client/views/nodes/formattedText/EquationEditor.tsx @@ -3,8 +3,7 @@ import React, { Component, createRef } from 'react'; // Import JQuery, required for the functioning of the equation editor import $ from 'jquery'; -// Import the styles from the Mathquill editor -import 'mathquill/build/mathquill.css'; +import './EquationEditor.scss'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore @@ -14,6 +13,8 @@ window.jQuery = $; // @ts-ignore require('mathquill/build/mathquill'); +(window as any).MathQuill = (window as any).MathQuill.getInterface(1); + type EquationEditorProps = { onChange(latex: string): void; value: string; @@ -74,8 +75,7 @@ class EquationEditor extends Component<EquationEditorProps> { autoOperatorNames, }; - // @ts-ignore - this.mathField = (MathQuill as any).MathField(this.element.current, config); + this.mathField = (window as any).MathQuill.MathField(this.element.current, config); this.mathField.latex(value || ''); } |
