From 31c63d88988fed316fbf59419c30321540573616 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 6 Jul 2025 21:40:53 +0400 Subject: [PATCH] refac --- src/lib/components/common/RichTextInput.svelte | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/components/common/RichTextInput.svelte b/src/lib/components/common/RichTextInput.svelte index 93eff041e0..420f288771 100644 --- a/src/lib/components/common/RichTextInput.svelte +++ b/src/lib/components/common/RichTextInput.svelte @@ -192,9 +192,7 @@ view.dispatch(tr); } else if (text === '') { // Empty: replace with empty paragraph using tr - const emptyParagraph = schema.nodes.paragraph.create(); - tr.replaceSelectionWith(emptyParagraph, false); - view.dispatch(tr); + editor.commands.clearContent(); } else { // Single line: create paragraph with text const paragraph = schema.nodes.paragraph.create({}, schema.text(text));