The default implementation of a document model.

Hierarchy

  • Model
    • DocumentModel

Implements

Constructors

Properties

_collaborationEnabled: any
_contentChanged: any
_defaultLang: any
_dirty: any
_onStateChanged: any
_readOnly: any
_stateChanged: any
sharedModel: ISharedFile

The shared notebook model.

standaloneModel: boolean

Whether the model should disposed the shared model on disposal or not.

Accessors

  • get collaborative(): boolean
  • Whether the model is collaborative or not.

    Returns boolean

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

    Returns ISignal<this, void>

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

    Notes

    This is a read-only property.

    Returns string

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

    Notes

    This is a read-only property.

    Returns string

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

    Returns boolean

  • set dirty(newValue): void
  • The dirty state of the model.

    Notes

    This should be cleared when the document is loaded from or saved to disk.

    Parameters

    • newValue: boolean

    Returns void

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

    Returns boolean

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

    Returns string

  • set mimeType(newValue): void
  • A mime type of the model.

    Notes

    It is never null, the default mime type is text/plain.

    Parameters

    • newValue: string

    Returns void

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

    Returns ISignal<this, IChangedArgs<string, string, string>>

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

    Returns boolean

  • set readOnly(newValue): void
  • The read-only state of the model.

    Parameters

    • newValue: boolean

    Returns void

  • get selections(): IObservableMap<ITextSelection[]>
  • Get the selections for the model.

    Returns IObservableMap<ITextSelection[]>

Methods

  • Dispose of the resources used by the model.

    Returns void

  • Deserialize the model from JSON.

    Notes

    Should emit a [contentChanged] signal.

    Parameters

    Returns void

  • Deserialize the model from a string.

    Notes

    Should emit a [contentChanged] signal.

    Parameters

    • value: string

    Returns void

  • Initialize the model with its current state.

    Returns void

  • Serialize the model to a string.

    Returns string

  • Trigger a content changed signal.

    Returns void

  • Trigger a state change signal.

    Parameters

    Returns void

Generated using TypeDoc