You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically, this should actually be relatively straightforward: listen to the various delta events (/(paragraph|section)(Insert|Update|Delete)/), figure out the opposite of that delta, and pop both, along with a copy of the selection at the time, onto a stack of some kind. Undo/redo is then simply a matter of applying the right deltas.
Trickier, however, is determining when to save the current state. MS Word is nonsensical in when it decides to save state; Sublime Text and Medium seems to base it on word boundaries, which is a much better experience.
The text was updated successfully, but these errors were encountered:
Technically, this should actually be relatively straightforward: listen to the various delta events (
/(paragraph|section)(Insert|Update|Delete)/
), figure out the opposite of that delta, and pop both, along with a copy of the selection at the time, onto a stack of some kind. Undo/redo is then simply a matter of applying the right deltas.Trickier, however, is determining when to save the current state. MS Word is nonsensical in when it decides to save state; Sublime Text and Medium seems to base it on word boundaries, which is a much better experience.
The text was updated successfully, but these errors were encountered: