From d3e5e09a51c7c95bffabd41b14e660aafcd80015 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 3 Jun 2025 22:32:16 -0400
Subject: fixed equationBox so that it can be used in templates.

---
 src/client/views/nodes/formattedText/EquationEditor.tsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/client/views/nodes/formattedText/EquationEditor.tsx')

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' }} />;
     }
-- 
cgit v1.2.3-70-g09d2

