diff --git a/src/hooks/useTextEditor.ts b/src/hooks/useTextEditor.ts index 391d072..574a06f 100644 --- a/src/hooks/useTextEditor.ts +++ b/src/hooks/useTextEditor.ts @@ -153,8 +153,7 @@ export const useTextEditor = ({ // if (editor.isDestroyed) return; if (!(value && editor.isEmpty)) return; editor.commands.setContent(value); - // !important: to avoid update for each taping, the value should be excluded from the dependencies - }, [editor]); + }, [editor, value]); // useEffect(() => {