From 9105cbfdf48231a2ededd043c988913468d80c79 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Mon, 17 Nov 2025 16:49:19 -0500 Subject: [PATCH] catch editor state done before subscribing --- components/Blocks/TextBlock/mountProsemirror.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/Blocks/TextBlock/mountProsemirror.ts b/components/Blocks/TextBlock/mountProsemirror.ts index e77b36bd..f4a59e32 100644 --- a/components/Blocks/TextBlock/mountProsemirror.ts +++ b/components/Blocks/TextBlock/mountProsemirror.ts @@ -91,6 +91,10 @@ export function useMountProsemirror({ props }: { props: BlockProps }) { editorState.view?.updateState(editorState.editor); }); + let editorState = useEditorStates.getState().editorStates[entityID]; + if (editorState?.editor && !editorState.initial) + editorState.view?.updateState(editorState.editor); + return () => { unsubscribe(); view.destroy(); -- 2.51.2