fix: fixed milkdown problem with text deletion

This commit is contained in:
2026-02-12 22:39:52 +01:00
parent 399709eb8d
commit b61dfd7b61

View File

@@ -319,6 +319,9 @@ const MilkdownProviderInner: React.FC<MilkdownEditorProps> = ({
normalizedBaseline.current = null; normalizedBaseline.current = null;
editor.action(replaceAll(content)); editor.action(replaceAll(content));
lastExternalContent.current = content; lastExternalContent.current = content;
} else if (isInternalChange.current) {
// Update ref for internal changes to keep it in sync
lastExternalContent.current = content;
} }
isInternalChange.current = false; isInternalChange.current = false;
}, [content, loading, getEditor]); }, [content, loading, getEditor]);