rtc.rst 2.1 KB

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