add undoOnEscape option