From fac8c3259cea3de849fdb6363a4727907ab7f0e5 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 23 Nov 2024 23:57:05 -0800 Subject: [PATCH] refac: rich text input behaviour --- src/lib/components/common/RichTextInput.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/components/common/RichTextInput.svelte b/src/lib/components/common/RichTextInput.svelte index 3e3f79a55..8200154fa 100644 --- a/src/lib/components/common/RichTextInput.svelte +++ b/src/lib/components/common/RichTextInput.svelte @@ -158,6 +158,10 @@ const newValue = turndownService.turndown(editor.getHTML()); if (value !== newValue) { value = newValue; + + if (value === '') { + editor.commands.clearContent(); + } } }, editorProps: {