aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/EquationEditor.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-06-03 22:32:16 -0400
committerbobzel <zzzman@gmail.com>2025-06-03 22:32:16 -0400
commitd3e5e09a51c7c95bffabd41b14e660aafcd80015 (patch)
tree051d656551acdce80502a21e181d1b239e02b793 /src/client/views/nodes/formattedText/EquationEditor.tsx
parent0f0e55075b001334134b7cadbac06b262466f287 (diff)
fixed equationBox so that it can be used in templates.
Diffstat (limited to 'src/client/views/nodes/formattedText/EquationEditor.tsx')
-rw-r--r--src/client/views/nodes/formattedText/EquationEditor.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/nodes/formattedText/EquationEditor.tsx b/src/client/views/nodes/formattedText/EquationEditor.tsx
index 48efa6e63..23d273523 100644
--- a/src/client/views/nodes/formattedText/EquationEditor.tsx
+++ b/src/client/views/nodes/formattedText/EquationEditor.tsx
@@ -72,6 +72,10 @@ class EquationEditor extends Component<EquationEditorProps> {
this.mathField.latex(value || '');
}
+ componentDidUpdate(prevProps: Readonly<EquationEditorProps>): void {
+ !prevProps.value && this.mathField.latex(this.props.value || '');
+ }
+
render() {
return <span ref={this.element} style={{ border: '0px', boxShadow: 'None' }} />;
}