Damus
Frederik Handberg · 1w
Been working on implementing undo/redo functionality in my notes app. The `UndoManager` API makes this easy by simply calling `registerUndo` and then you can use `setActionName` to give it a name tha...
Frederik Handberg profile picture
This functionality is now supported by most block types, but still need to integrate the `UndoManager` in a few more blocks like headings and videos.

Afterwards, I should make undo/redo work in the visual canvas.

I also need to test thoroughly to make sure it only performs the undo action for the open tab, and not in other tabs and/or windows as well.

The `UndoManager` is injected in the ViewModels and each open file (note/canvas) has its own ViewModel, but the shortcut `Cmd+Z` might work globally which would be a problem.

Too tired to test it, but should try it tomorrow…