Interface ISharedCodeCell

Implements an API for nbformat.ICodeCell.

Hierarchy

Implemented by

Properties

cell_type: "code"

The type of the cell.

The changed signal.

disposed: ISignal<ISharedCodeCell, void>

A signal emitted when the object is disposed.

executionState: IExecutionState

The code cell's execution state.

execution_count: ExecutionCount

The code cell's prompt number. Will be null if the cell has not been run.

id: string

Cell id.

isDisposed: boolean

Test whether the object has been disposed.

Notes

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<IBaseCellMetadata>

Cell metadata.

Notes

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

metadataChanged: ISignal<ISharedCodeCell, IMapChange<any>>

Signal triggered when the cell metadata changes.

notebook: null | ISharedNotebook

The notebook that this cell belongs to.

outputs: IOutput[]

Cell outputs

source: string

Text

Methods

  • 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

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

    • Optional origin: any

    Returns void

  • Replace content from start' to endwithoutputs`.

    Parameters

    • start: number
    • end: number
    • outputs: IOutput[]

    Returns void

  • Replace content from start to end with value.

    Parameters

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

    Returns void

Generated using TypeDoc