From a20a920ca46e587dcf11dcf3428cd25c798183d1 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 5 May 2025 09:41:25 +0400 Subject: [PATCH] refac: styling --- src/lib/components/notes/NoteEditor.svelte | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/lib/components/notes/NoteEditor.svelte b/src/lib/components/notes/NoteEditor.svelte index 0ff91d3a4..d1983d5c2 100644 --- a/src/lib/components/notes/NoteEditor.svelte +++ b/src/lib/components/notes/NoteEditor.svelte @@ -458,6 +458,14 @@ } }; + const scrollToBottom = () => { + const element = document.getElementById('note-content-container'); + + if (element) { + element.scrollTop = element?.scrollHeight; + } + }; + const enhanceCompletionHandler = async (model) => { let enhancedContent = { json: null, @@ -534,6 +542,8 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings, note.data.content.md = enhancedContent.md; note.data.content.html = enhancedContent.html; note.data.content.json = null; + + scrollToBottom(); } } } @@ -668,7 +678,7 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings, {:else}
-
+
-
+
{#if enhancing}