diff --git a/frontend/js/utils.js b/frontend/js/utils.js index ef8bfdd..616a35d 100644 --- a/frontend/js/utils.js +++ b/frontend/js/utils.js @@ -1,6 +1,7 @@ import { state } from './state.js'; import { api } from './auth.js'; -import { openFile } from './viewer.js'; +import { openFile, showWelcome } from './viewer.js'; +import { refreshSidebarForContext, refreshTagsForContext } from './sidebar.js'; // --------------------------------------------------------------------------- // File extension → Lucide icon mapping @@ -353,13 +354,13 @@ async function openEditor(vaultName, filePath) { extensions.push(oneDark); } - const state = EditorState.create({ + const cmState = EditorState.create({ doc: rawData.raw, extensions: extensions, }); state.editorView = new EditorView({ - state: state, + state: cmState, parent: bodyEl, }); } catch (err) {