diff --git a/src/renderer/components/Editor/MarkdownEditor.tsx b/src/renderer/components/Editor/MarkdownEditor.tsx index 0b8902f..d9e5a29 100644 --- a/src/renderer/components/Editor/MarkdownEditor.tsx +++ b/src/renderer/components/Editor/MarkdownEditor.tsx @@ -92,10 +92,12 @@ export function MarkdownEditor(): JSX.Element { useEffect(() => { if (!editorRef.current) return const isDark = theme === 'dark' + const { activeStoryContent, activeStoryPath } = useBorgesStore.getState() + lastPathRef.current = activeStoryPath const view = new EditorView({ state: EditorState.create({ - doc: '', + doc: activeStoryContent, extensions: [ history(), markdown(),