📚 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
Fix markdown editor
Veauville Raphaeld946c00af0d2
diff --git a/dashboard/components/DocumentsList/List.vue b/dashboard/components/DocumentsList/List.vueindex 14fdbd98..48e104b5 100644--- a/dashboard/components/DocumentsList/List.vue+++ b/dashboard/components/DocumentsList/List.vue@@ -33,8 +33,6 @@ const docs = computed(() => {const normal = (() => {return useDocumentsStore().getAll.filter((doc) => {- console.log(doc.category);-if (!route.query.category) return true;if (route.query.category === 'uncategorized') return !doc.category;if (route.query.category === 'draft') return doc.accessibility === 2diff --git a/dashboard/components/MarkdownEditor/MarkdownEditor.vue b/dashboard/components/MarkdownEditor/MarkdownEditor.vueindex f35501a1..51251191 100644--- a/dashboard/components/MarkdownEditor/MarkdownEditor.vue+++ b/dashboard/components/MarkdownEditor/MarkdownEditor.vue@@ -8,7 +8,7 @@<textarea ref="textarea" class="content input" placeholder="Écrivez votre contenu ici..."v-model="document.content_markdown"></textarea></div>- <div v-if="showPreview" class="markdown-preview document-theme" v-html="compiledMarkdown"></div>+ <div v-if="showPreview" class="markdown-preview document-theme" v-html="document.content_html"></div></div></div></template>@@ -23,11 +23,15 @@ import compile from "~/helpers/markdown";const props = defineProps<{ doc?: Document }>();const document = ref<Document | Partial<Document>>({ ...props.doc });const textarea = ref<HTMLTextAreaElement>();-const compiledMarkdown = computed(() => compile(document.value.content_markdown, true));const showPreview = ref(false);const emit = defineEmits(['save']);+watchEffect(() => {+ if (!document.value.content_markdown) return;+ document.value.content_html = compile(document.value.content_markdown, true);+});+function exec(action: string) {if (!textarea.value) return;const selectedText = window.getSelection()?.toString() || '';