Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NotebookModelFactory

A model factory for notebooks.

Hierarchy

  • NotebookModelFactory

Implements

Index

Constructors

constructor

  • Construct a new notebook model factory.

    Parameters

    Returns NotebookModelFactory

Properties

Private _collaborative

_collaborative: any

Private _disableDocumentWideUndoRedo

_disableDocumentWideUndoRedo: any

Defines if the document can be undo/redo.

Private _disposed

_disposed: any

Readonly contentFactory

contentFactory: IContentFactory

The content model factory used by the NotebookModelFactory.

Accessors

collaborative

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

    Returns boolean

contentType

  • get contentType(): string
  • The content type of the file.

    Returns string

disableDocumentWideUndoRedo

  • get disableDocumentWideUndoRedo(): boolean
  • set disableDocumentWideUndoRedo(disableDocumentWideUndoRedo: boolean): void
  • Define the disableDocumentWideUndoRedo property.

    experimental
    alpha

    Returns boolean

  • Define the disableDocumentWideUndoRedo property.

    Parameters

    • disableDocumentWideUndoRedo: boolean

    Returns void

fileFormat

isDisposed

  • get isDisposed(): boolean
  • Get whether the model factory has been disposed.

    Returns boolean

name

  • get name(): string
  • The name of the model.

    Returns string

Methods

createNew

  • createNew(languagePreference?: string, modelDB?: IModelDB, isInitialized?: boolean, collaborationEnabled?: boolean): INotebookModel
  • Create a new model for a given path.

    Parameters

    • Optional languagePreference: string

      An optional kernel language preference.

    • Optional modelDB: IModelDB

      An optional model storage.

    • Optional isInitialized: boolean

      Whether the model is initialized or not.

    • Optional collaborationEnabled: boolean

      Whether collaboration is enabled at the application level or not (default false).

    Returns INotebookModel

    A new document model.

dispose

  • dispose(): void
  • Dispose of the model factory.

    Returns void

preferredLanguage

  • preferredLanguage(path: string): string
  • Get the preferred kernel language given a path.

    Parameters

    • path: string

    Returns string

Generated using TypeDoc