automerge / automerge-classic

A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
http://automerge.org/
MIT License
14.75k stars 466 forks source link

Allow a document to be reverted back to a previous version #355

Open ept opened 3 years ago

ept commented 3 years ago

Automerge.getHistory allows you to inspect past versions of a document, but it does not provide a mechanism for reverting a document to a past version without discarding the change history since that version. It would be good to have some way of generating an "inverse change" which can be applied to a document in order to revert those changes. This is also related to undo (#318). Here are some ideas on how to do that: