edit-text
                                
                                
                                
                                    edit-text copied to clipboard
                            
                            
                            
                        Support undo
If OT::apply were to have a sibling method OT::apply_reversable(...) which returned a tuple (Doc, reverse_op), where reverse_op applied to Doc would result in the inverse method, then undo could be possible.
https://github.com/tcr/edit-text/blob/55003eed3ddd2307a6a28d0773bf334d5f511cc9/edit-client/src/state.rs#L274-L275
Here the undo would be generated, and then attached to the self object. Each time an operation is performed, this undo is replaced (or queued, for multiple-level undo) or if we have incoming packets, the undo packet is transformed against the incoming packet.