Setup the ability to undo the last action and filled out the ability to undo inserting text