benrbray / prosemirror-math

Schema and plugins for "first-class" math support in ProseMirror!
https://benrbray.com/prosemirror-math/
MIT License
249 stars 35 forks source link

Undo #16

Open bohrium opened 3 years ago

bohrium commented 3 years ago

I'm using prosemirror-math as an in-browser text editor. For this it would be useful to have someway to undo changes --- e.g. "[esc]"-then-"u" or "[ctrl]"-and-"z". One way to do this is to maintain a stack for the history. Maintaining such a redundant history can in principle cost lots of space, but since these are human-generated strings of text, that might be a negligible event.

benrbray commented 3 years ago

Actually, ProseMirror has built-in support for history, so this is just a matter of enabling the history plugin on the demo page. I'll add it in!