rtc.rst 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .. _rtc:
  2. Real Time Collaboration
  3. =======================
  4. From JupyterLab 3.1, file documents and notebooks have collaborative
  5. editing using the `Yjs shared editing framework <https://github.com/yjs/yjs>`_.
  6. Editors are not collaborative by default; to activate it, start JupyterLab
  7. with the ``--collaborative`` flag.
  8. To share a document with other users, you can copy the URL and send it, or you
  9. can install a helpful extension called
  10. `jupyterlab-link-share <https://github.com/jupyterlab-contrib/jupyterlab-link-share>`_
  11. that might help to share the link including the token.
  12. The new collaborative editing feature enables collaboration in real-time
  13. between multiple clients without user roles, when sharing the URL of a
  14. document to other users, they will have access to the same environment you
  15. are working on (they can write and execute the cells).
  16. Moreover, you can see the cursors from other users with an anonymous
  17. username, a username that will disappear in a few seconds to make room
  18. for what is essential, the document's content.
  19. .. image:: images/shared_cursors.png
  20. :align: center
  21. :class: jp-screenshot
  22. Something you need to be aware of is that not all editors in JupyterLab support sync.
  23. Additionally, opening the same underlying document using different editor types may result
  24. in a lack of synchronization.
  25. For example, on JupyterLab, you can open a Notebook using the Notebook
  26. editor or a plain text editor, the so-called Editor. Those editors are
  27. not synchronized because, under the hood, they use a different model to
  28. represent the document's content, what we call ``DocumentModel``. If you
  29. modify a Notebook with both editors simultaneously, JupyterLab will prompt
  30. a warning message indicating that the document's content changed. For more
  31. information, you can read the section of
  32. `Documents <https://jupyterlab.readthedocs.io/en/3.3.x/extension/documents.html#documents>`_.
  33. .. image:: images/sync_editors.png
  34. :align: center
  35. :class: jp-screenshot