Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Sync scroll when new line added

Smaug6739be607b74867a
diff --git a/frontend/components/MarkdownEditor/MarkdownEditor.vue b/frontend/components/MarkdownEditor/MarkdownEditor.vue
index d5d4fc4e..4291a718 100644
--- a/frontend/components/MarkdownEditor/MarkdownEditor.vue
+++ b/frontend/components/MarkdownEditor/MarkdownEditor.vue
@@ -6,7 +6,7 @@
<input placeholder="Description" class="description" v-model="document.description" />
<div class="markdown" ref="container">
<InlineToolbar ref="toolbar" @execute-action="(a:string) => editor.actions(a)" />
- <textarea ref="textarea" class="content markdown-input" @scroll="syncScroll" @input="update" v-html="document.content_markdown || ''" placeholder="Write something or use the toolbar to create your document..."></textarea>
+ <textarea ref="textarea" class="content markdown-input" @scroll="syncScroll" @input="update" v-html="document.content_markdown || ''" placeholder="Write something or use the toolbar to create your document..." @keyup="syncScroll"></textarea>
<div v-if="editor.showPreview.value" class="markdown-preview document-theme" ref="markdownPreview" v-html="document.content_html || ''"></div>
</div>
</div>