Implementing Document Versions using TipTap and HocusPocus

@dmonad and anyone else!

Hello! I’m trying to create a collaborative editor using Tiptap and HocusPocus that also allows users to restore previous document versions. It looks like Tiptap ultimately wraps y-prosemirror, including the ySyncPlugin, so I think that it should be possible to largely copy the prose mirror-versions demo (yjs-demos/prosemirror-versions at main · yjs/yjs-demos · GitHub). I initially tried to do this without including permanentUserData, but got some errors. My questions are:

  1. Is permanentUserData required to revert to a previous document version? And what role does it play in doing so?

  2. If it is required, is it a dynamic object which can change as more users edit a document? In the example I see that 3 testUsers are hardcoded, but can this field accommodate a changing list of users?

Thanks!