Interface ISharedBaseCell<Metadata>

Implements an API for nbformat.IBaseCell.

Type Parameters

  • Metadata extends nbformat.IBaseCellMetadata = nbformat.IBaseCellMetadata


Implemented by


cell_type: string

The type of the cell.

changed: ISignal<ISharedBaseCell<Metadata>, CellChange>

The changed signal.

disposed: ISignal<ISharedBaseCell<Metadata>, void>

A signal emitted when the object is disposed.

id: string

Cell id.

isDisposed: boolean

Test whether the object has been disposed.


This property is always safe to access.

isStandalone: boolean

Whether the cell is standalone or not.

If the cell is standalone. It cannot be inserted into a YNotebook because the Yjs model is already attached to an anonymous Y.Doc instance.

metadata: Partial<Metadata>

Cell metadata.


You should prefer to access and modify the specific key of interest.

metadataChanged: ISignal<ISharedBaseCell<Metadata>, IMapChange<any>>

Signal triggered when the cell metadata changes.

notebook: null | ISharedNotebook

The notebook that this cell belongs to.

source: string



  • Delete a metadata cell.


    • 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

  • Get Cell id.


    Cell id.

    Returns string

  • Returns all metadata associated with the cell.


    Cell's metadata.

    Returns Partial<Metadata>

  • Returns a metadata associated with the cell.


    Cell's metadata.


    • key: string

      Metadata key to get

    Returns undefined | PartialJSONValue

  • Sets some cell metadata.


    • metadata: Partial<Metadata>

      Cell's metadata.

    Returns void

  • Sets a cell metadata.


    • metadata: string

      Cell's metadata key.

    • value: PartialJSONValue

      Metadata value

    Returns void

  • Serialize the model to JSON.

    Returns IBaseCell

  • 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

  • Replace content from start' to endwithvalue`.


    • start: number
    • end: number
    • Optional value: string

    Returns void

Generated using TypeDoc