TEKsystems interview question

How would you implement an undo/redo in a simple editor