diff options
author | bobzel <zzzman@gmail.com> | 2025-06-03 22:32:16 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-06-03 22:32:16 -0400 |
commit | d3e5e09a51c7c95bffabd41b14e660aafcd80015 (patch) | |
tree | 051d656551acdce80502a21e181d1b239e02b793 /src/client/views/nodes/formattedText/EquationEditor.tsx | |
parent | 0f0e55075b001334134b7cadbac06b262466f287 (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.tsx | 4 |
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' }} />; } |