From 8d898ff477e17c464a92ded1c49e82e02cbc078a Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 30 Jan 2022 02:26:23 +0900 Subject: [PATCH] Don't fill empty content when switching rich editor --- plume-front/src/editor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plume-front/src/editor.rs b/plume-front/src/editor.rs index 1bb2e934..94bbbb59 100644 --- a/plume-front/src/editor.rs +++ b/plume-front/src/editor.rs @@ -397,7 +397,9 @@ fn init_editor() -> Result<(), EditorError> { content_val.clone(), false, )?; - content.set_inner_html(&content_val); + if !content_val.is_empty() { + content.set_inner_html(&content_val); + } // character counter let character_counter = Closure::wrap(Box::new(mv!(content => move |_| {