From b23600b49db09b0db9f543d0d12863b56abeb3dd Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 21 Nov 2024 22:15:04 -0800 Subject: [PATCH] refac --- src/lib/components/common/RichTextInput.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/components/common/RichTextInput.svelte b/src/lib/components/common/RichTextInput.svelte index ebd5950c8..d32eed552 100644 --- a/src/lib/components/common/RichTextInput.svelte +++ b/src/lib/components/common/RichTextInput.svelte @@ -117,7 +117,13 @@ }; onMount(() => { - const content = marked.parse(value); + let content = ''; + try { + content = marked.parse(value); + } catch (error) { + console.error('Error parsing markdown content:', error); + } + editor = new Editor({ element: element, extensions: [