feat(markdown): integrate undo/redo for edit mode and checkbox toggles

This commit is contained in:
Hiren Kangad
2026-03-13 11:21:28 +05:30
parent 6118193f19
commit b1163c3232
2 changed files with 50 additions and 14 deletions
+1
View File
@@ -161,6 +161,7 @@ export function useCanvasSetup(deps: CanvasSetupDeps) {
// Double-click markdown → enter edit mode
selection.onDoubleClickMarkdown = (item) => {
if (mdOverlayRef.current) {
undoRef.current?.saveState();
mdOverlayRef.current.setEditing(item.id);
selection.setEnabled(false);
}