Hey folks,
I want to build an app that supports collaboratively editing a project consisting of multiple files, of which only one file is open at a time. Nevertheless, I want to receive updates from other users in the project when they edit files whose editor I don’t have open at the moment.
Thanks to the collaborative editing example, I was able to build a ViewPlugin that handles synchronization for the file in the foreground (for which I instantiated an EditorView and State). Now I’m asking myself how to receive updates for the background editors. With the collaboration logic in a view plugin, I thought of mounting a EditorView for each background document into a DocumentFragment.
However, initialising a view for each state seems wrong. Is there another good way to listen to server updates and dispatch transactions on naked EditorStates?
Thanks for your help!