Don't fill empty content when switching rich editor

This commit is contained in:
Kitaiti Makoto 2022-01-30 02:26:23 +09:00
parent a1045dbce9
commit 8d898ff477

View File

@ -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 |_| {