Optionalcatch_Load the latest saved document. Called when this window gets the pen after someone else held it: what is on screen here is the version from before their edits, and editing it would overwrite them. Editing stays withheld until it settles.
The room: the template's id.
Optionaledit_Edit together (TYP-919): every window that may edit edits at once, and each edit reaches the
others within a moment. Without it one window holds the pen at a time, and a window on the pen
in the same room holds the ones editing together until it is put down. One window saves for
everyone — editing.writer — so a host autosaves only there.
OptionalreleaseSave before this window gives the pen to the user's own other window (take_over() there).
Resolve false — the save failed — and this window keeps it. Without it the pen is handed
over at once, so a host that saves at all should pass it.
A fresh collab token for document_id, from the host's backend (file-service issues it).
Called on every connect and reconnect: a token lives two minutes, so never cache one.
The collab-service endpoint, e.g. wss://collab.typograph.nl/collab.
OptionalversionThe saved version of the template this window loaded — the storage's ETag — so that the
room knows which version it holds (TYP-1140). Without it the room records none, and
room_version() stays null.
Working in one template together (TYP-918): everyone in it sees the others' pointers and selections. Off unless a host passes
collaborationto the Editor.The connection is the editor's; canvas only draws what it is given (set_remote_presence) and says where the local pointer is (spread_point_at). Without
edit_togethernobody's edits travel: one window holds the pen, and nothing here touches the document. With it, every window that may edit edits and its changes reach the others through ElementSync (TYP-919).