Interface ISharedNotebook

Implements an API for nbformat.INotebookContent


Implemented by


cells: ISharedCell[]

The list of shared cells in the notebook.

The changed signal.

disableDocumentWideUndoRedo?: boolean

Wether the undo/redo logic should be considered on the full document across all cells.

disposed: ISignal<ISharedNotebook, void>

A signal emitted when the object is disposed.

isDisposed: boolean

Test whether the object has been disposed.


This property is always safe to access.

Notebook metadata.

metadataChanged: ISignal<ISharedNotebook, IMapChange<any>>

Signal triggered when a metadata changes.

nbformat: number

The major version number of the nbformat.

nbformat_minor: number

The minor version number of the nbformat.

state: JSONObject

Document state

version: string

Document version


  • Remove a cell.


    • index: number

    Returns void

  • Remove a range of cells.


    • from: number
    • to: number

    Returns void

  • Delete a metadata notebook.


    • key: string

      The key to delete

    Returns void

  • Dispose of the resources held by the object.


    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    Undefined Behavior

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void

  • Insert a shared cell into a specific position.


    The inserted cell.


    • index: number

      Cell's position.

    • cell: Cell

      Cell to insert.

    Returns ISharedCell

  • Insert a list of shared cells into a specific position.


    The inserted cells.


    • index: number

      Position to insert the cells.

    • cells: Cell[]

      Array of shared cells to insert.

    Returns ISharedCell[]

  • Move a cell.


    • fromIndex: number
    • toIndex: number

    Returns void

  • Move cells.


    • fromIndex: number
    • toIndex: number
    • Optional n: number

    Returns void

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


    • f: (() => void)

      Transaction to execute

        • (): void
        • Returns void

    • Optional undoable: boolean

      Whether to track the change in the action history or not (default true)

    Returns void

Generated using TypeDoc