Is it possible to store the edit history and restore when usin yjs

I want to store the users history and list the history, is it possible to store the yjs document edit history? restore the history. I have read the Y.UndoManager - Yjs Docs only found the undo redo. I also tried like this:

ydoc.on('update', (update) => {

but did not found the store method. I am using as the codemirror tool, y-websocket as the server side.