📚 The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Update LazyMarkdownEditor.vue
louloudev59eec808d36f47
diff --git a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vueindex 826eec66..433b0540 100644--- a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue+++ b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue@@ -26,6 +26,7 @@ import { materialLight } from '@fsegurai/codemirror-theme-material-light';import { materialDark } from '@fsegurai/codemirror-theme-material-dark';import Toolbar from './Toolbar.vue';import ImageSelectorModal from './ImageSelectorModal.vue';+import GridOrganizationModal from './GridOrganizationModal.vue';import compile from '~/helpers/markdown';import type { Document } from '~/stores';@@ -51,6 +52,7 @@ function exec(action: string, payload?: string) {if (action === 'save') return save();if (action === 'goto') if (document.value.id) return useRouter().push(`/dashboard/docs/${document.value.id}`);if (action === 'image') return openImageSelector();+ if (action === 'gridOrganization') return openGridOrganization();if (!editorView.value) return;@@ -159,6 +161,15 @@ function openImageSelector() {console.log('Modals après ouverture:', modalManager.modals.value.length);}+function openGridOrganization() {+ const modalManager = useModal();+ // Fermer tous les modals existants avant d'en ouvrir un nouveau+ while (modalManager.modals.value.length > 0) {+ modalManager.close(modalManager.modals.value[0]);+ }+ modalManager.add(new Modal(shallowRef(GridOrganizationModal), { onGridSelect: handleGridSelect }, () => {}, true));+}+function handleImageSelect(imageUrl: string, altText: string) {if (!editorView.value) return;@@ -177,6 +188,21 @@ function handleImageSelect(imageUrl: string, altText: string) {view.focus();}++function handleGridSelect(gridMarkdown: string) {+ if (!editorView.value) return;++ const view = editorView.value;+ const state = view.state;+ const { from, to } = state.selection.main;++ view.dispatch({+ changes: { from, to, insert: gridMarkdown },+ selection: { anchor: from + gridMarkdown.length, head: from + gridMarkdown.length },+ });++ view.focus();+}const snippets: Record<string, string> = {'!blue': ':::blue\n$0\n:::','!green': ':::green\n$0\n:::',