Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NotebookModel

An implementation of a notebook Model.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Private _cells

_cells: any

Private _deletedCells

_deletedCells: any

Private _ensureMetadata

_ensureMetadata: any

Make sure we have the required metadata fields.

Private _nbformat

_nbformat: any

Private _nbformatMinor

_nbformatMinor: any

Private _onCellsChanged

_onCellsChanged: any

Handle a change in the cells list.

Private _trans

_trans: any

Readonly contentFactory

contentFactory: IContentFactory

The cell model factory for the notebook.

Readonly modelDB

modelDB: IModelDB

The underlying IModelDB instance in which model data is stored.

Accessors

cells

contentChanged

  • get contentChanged(): ISignal<this, void>
  • A signal emitted when the document content changes.

    Returns ISignal<this, void>

defaultKernelLanguage

  • get defaultKernelLanguage(): string
  • The default kernel language of the document.

    Returns string

defaultKernelName

  • get defaultKernelName(): string
  • The default kernel name of the document.

    Returns string

deletedCells

  • get deletedCells(): string[]
  • A list of deleted cells for the notebook..

    Returns string[]

dirty

  • get dirty(): boolean
  • set dirty(newValue: boolean): any
  • The dirty state of the document.

    Returns boolean

  • The dirty state of the document.

    Parameters

    • newValue: boolean

    Returns any

isDisposed

  • get isDisposed(): boolean
  • Whether the model is disposed.

    Returns boolean

metadata

  • The metadata associated with the notebook.

    Returns IObservableJSON

mimeType

  • get mimeType(): string
  • set mimeType(newValue: string): any
  • A mime type of the model.

    Returns string

  • A mime type of the model.

    Parameters

    • newValue: string

    Returns any

mimeTypeChanged

  • get mimeTypeChanged(): ISignal<this, IChangedArgs<string>>
  • A signal emitted when a mimetype changes.

    Returns ISignal<this, IChangedArgs<string>>

nbformat

  • get nbformat(): number
  • The major version number of the nbformat.

    Returns number

nbformatMinor

  • get nbformatMinor(): number
  • The minor version number of the nbformat.

    Returns number

readOnly

  • get readOnly(): boolean
  • set readOnly(newValue: boolean): any
  • The read only state of the document.

    Returns boolean

  • The read only state of the document.

    Parameters

    • newValue: boolean

    Returns any

selections

  • Get the selections for the model.

    Returns IObservableMap<ITextSelection[]>

stateChanged

  • A signal emitted when the document state changes.

    Returns ISignal<this, IChangedArgs<any>>

value

  • Get the value of the model.

    Returns IObservableString

Methods

dispose

  • dispose(): void

fromJSON

  • fromJSON(value: nbformat.INotebookContent): void
  • Deserialize the model from JSON.

    Notes

    Should emit a [contentChanged] signal.

    Parameters

    • value: nbformat.INotebookContent

    Returns void

fromString

  • fromString(value: string): void

initialize

  • initialize(): void

toJSON

  • toJSON(): nbformat.INotebookContent

toString

  • toString(): string

Protected triggerContentChange

  • triggerContentChange(): void

Protected triggerStateChange

Generated using TypeDoc