You can undo recent changes you make to a document then redo them if you change your mind.
Do one of the following:
Undo the last action: Tap Undo on the left side of the toolbar. Tap multiple times to undo all your recent actions.
Redo the last action: Touch and hold Undo, then tap Redo. Tap Redo multiple times to redo all your recent actions.
You can also shake your device, then tap Undo or Redo. If you can’t undo an action by shaking, be sure that you finished the action by tapping Done or by closing an open menu.