Interface ISharedNotebook

Implements an API for nbformat.INotebookContent

Hierarchy

Implemented by

Properties

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.

Notes

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

Methods

  • Remove a cell.

    Parameters

    • index: number

    Returns void

  • Remove a range of cells.

    Parameters

    • from: number
    • to: number

    Returns void

  • Delete a metadata notebook.

    Parameters

    • key: string

      The key to delete

    Returns void

  • Dispose of the resources held by the object.

    Notes

    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.

    Returns

    The inserted cell.

    Parameters

    • index: number

      Cell's position.

    • cell: Cell

      Cell to insert.

    Returns ISharedCell

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

    Returns

    The inserted cells.

    Parameters

    • index: number

      Position to insert the cells.

    • cells: Cell[]

      Array of shared cells to insert.

    Returns ISharedCell[]

  • Move a cell.

    Parameters

    • fromIndex: number
    • toIndex: number

    Returns void

  • Move cells.

    Parameters

    • 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.

    Parameters

    • 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