refac: rich text input behaviour

This commit is contained in:
Timothy Jaeryang Baek 2024-11-23 23:57:05 -08:00
parent e67fdce727
commit fac8c3259c

View File

@ -158,6 +158,10 @@
const newValue = turndownService.turndown(editor.getHTML()); const newValue = turndownService.turndown(editor.getHTML());
if (value !== newValue) { if (value !== newValue) {
value = newValue; value = newValue;
if (value === '') {
editor.commands.clearContent();
}
} }
}, },
editorProps: { editorProps: {