Browse Source

refac: rich text input behaviour

Timothy Jaeryang Baek 5 months ago
parent
commit
fac8c3259c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/lib/components/common/RichTextInput.svelte

+ 4 - 0
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: {