https://codemirror.net/6/examples/collab/ This API shows how to use collab editing.
Activity