My undos:


NativeBrowserUndo's one function call inserts an action in the browser undo stack.
Then the page supports a native Undo by system menu, keyboard shortcut, execCommand, shaking the phone, whatever:
NativeBrowserUndo.RegisterAction( undo_function, redo_function );

A <div contenteditable> element

NativeBrowserUndo is (c) 2021 Hypervariety Custom Programming, LLC. All rights reserved. Non-commercial use is permitted by the author, as long as this copyright message accompanies the product and source. For commercial use, please contact Hypervariety.