Options
All
  • Public
  • Public/Protected
  • All
Menu

The default implementation of the editor model.

Hierarchy

  • Model

Implements

Index

Constructors

constructor

Properties

Private _isDisposed

_isDisposed: boolean = false

Private _mimeTypeChanged

_mimeTypeChanged: Signal<Model, IChangedArgs<string, string, string>> = ...

Private _sharedModelSwitched

_sharedModelSwitched: Signal<Model, boolean> = ...

Readonly modelDB

modelDB: IModelDB

The underlying IModelDB instance in which model data is stored.

sharedModel

sharedModel: ISharedText

The shared model for the cell editor.

Accessors

isDisposed

  • get isDisposed(): boolean

mimeType

  • get mimeType(): string
  • set mimeType(newValue: string): void

mimeTypeChanged

  • get mimeTypeChanged(): ISignal<this, IChangedArgs<string, string, string>>

selections

sharedModelSwitched

  • get sharedModelSwitched(): ISignal<this, boolean>

type

value

Methods

Private _onModelDBMimeTypeChanged

Private _onModelDBValueChanged

Protected _onSharedModelChanged

  • _onSharedModelChanged(sender: ISharedBaseCell<any>, change: CellChange<IBaseCellMetadata>): void
  • We update the modeldb store when the shared model changes. To ensure that we don't run into infinite loops, we wrap this call in a "mutex". The "mutex" ensures that the wrapped code can only be executed by either the sharedModelChanged handler or the modelDB change handler.

    Parameters

    Returns void

dispose

  • dispose(): void

switchSharedModel

  • switchSharedModel(sharedModel: ISharedText, reinitialize?: boolean): void
  • When we initialize a cell model, we create a standalone model that cannot be shared in a YNotebook. Call this function to re-initialize the local representation based on a fresh shared model (e.g. models.YFile or models.YCodeCell).

    Parameters

    • sharedModel: ISharedText
    • Optional reinitialize: boolean

      Whether to reinitialize the shared model.

    Returns void

Generated using TypeDoc