@jupyter/ydoc
    Preparing search index...

    Class YNotebook

    Shared implementation of the Shared Document types.

    Shared cells can be inserted into a SharedNotebook. Shared cells only start emitting events when they are connected to a SharedNotebook.

    "Standalone" cells must not be inserted into a (Shared)Notebook. Standalone cells emit events immediately after they have been created, but they must not be included into a (Shared)Notebook.

    Hierarchy (View Summary)

    Implements

    Index
    _changed: Signal<YNotebook, NotebookChange> = ...
    _metadataChanged: Signal<YNotebook, IMapChange<any>> = ...
    _ycells: YArray<YMap<any>> = ...

    Internal Yjs cells list

    cells: YCellType[]

    Cells list

    version: string = '2.0.0'

    Document version

    ymeta: YMap<any> = ...

    YJS map for the notebook metadata

    • Remove a range of cells.

      Parameters

      • from: number

        The start index of the range to remove (inclusive).

      • to: number

        The end index of the range to remove (exclusive).

      Returns void

    • Move cells.

      Parameters

      • fromIndex: number

        Index of the first cells to move.

      • toIndex: number

        New position of the first cell (in the current array).

      • n: number = 1

        Number of cells to move (default 1)

      Returns void

    • Perform a transaction. While the function f is called, all changes to the shared document are bundled into a single event.

      Parameters

      • f: () => void
      • undoable: boolean = true
      • origin: any = null

      Returns void