Adapter to enable undo