Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CellModel

An implementation of the cell model. The namespace for CellModel statics.

Hierarchy

Implements

Index

Constructors

constructor

  • new CellModel(options: IOptions): CellModel
  • Construct a cell model from optional cell content.

    Parameters

    • options: IOptions

    Returns CellModel

Properties

contentChanged

contentChanged: Signal<this, void> = new Signal<this, void>(this)

A signal emitted when the state of the model changes.

id

id: string

The id for the cell.

isDisposed

isDisposed: boolean

Whether the model is disposed.

mimeType

mimeType: string

A mime type of the model.

mimeTypeChanged

mimeTypeChanged: ISignal<this, IChangedArgs<string>>

A signal emitted when a mimetype changes.

modelDB

modelDB: IModelDB

The underlying IModelDB instance in which model data is stored.

selections

selections: IObservableMap<ITextSelection[]>

Get the selections for the model.

stateChanged

stateChanged: Signal<this, IChangedArgs<any>> = new Signal<this, IChangedArgs<any>>(this)

A signal emitted when a model state changes.

type

type: nbformat.CellType

The type of cell.

value

value: IObservableString

Get the value of the model.

Accessors

metadata

  • get metadata(): IObservableJSON
  • The metadata associated with the cell.

    Returns IObservableJSON

trusted

  • get trusted(): boolean
  • set trusted(newValue: boolean): void
  • Get the trusted state of the model.

    Returns boolean

  • Set the trusted state of the model.

    Parameters

    • newValue: boolean

    Returns void

Methods

dispose

  • dispose(): void
  • Dispose of the resources used by the model.

    Returns void

Protected onGenericChange

  • onGenericChange(): void
  • Handle a change to the observable value.

    Returns void

onTrustedChanged

  • onTrustedChanged(trusted: IObservableValue, args: IChangedArgs): void
  • Handle a change to the trusted state.

    The default implementation is a no-op.

    Parameters

    • trusted: IObservableValue
    • args: IChangedArgs

    Returns void

toJSON

  • toJSON(): nbformat.ICell

Generated using TypeDoc