The interface for a document model.

Hierarchy

Properties

collaborative?: boolean

Whether this document model supports collaboration when the collaborative flag is enabled globally. Defaults to false.

contentChanged: ISignal<DocumentRegistry.IModel, void>

A signal emitted when the document content changes.

defaultKernelLanguage: string

The default kernel language of the document.

defaultKernelName: string

The default kernel name of the document.

dirty: boolean

The dirty state of the model.

Notes

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

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

readOnly: boolean

The read-only state of the model.

sharedModel: ISharedDocument

The shared notebook model.

stateChanged: ISignal<DocumentRegistry.IModel, IChangedArgs<any, any, string>>

A signal emitted when the model state changes.

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

  • Deserialize the model from JSON.

    Notes

    Should emit a [contentChanged] signal.

    Parameters

    • value: ReadonlyPartialJSONValue

    Returns void

  • Deserialize the model from a string.

    Notes

    Should emit a [contentChanged] signal.

    Parameters

    • value: string

    Returns void

  • Serialize the model to a string.

    Returns string

Generated using TypeDoc