Class YNotebook

Shared implementation of the Shared Document types.

Shared cells can be inserted into a SharedNotebook. Shared cells only start emitting events when they are connected to a SharedNotebook.

"Standalone" cells must not be inserted into a (Shared)Notebook. Standalone cells emit events immediately after they have been created, but they must not be included into a (Shared)Notebook.

Hierarchy

Implements

Constructors

Properties

_changed: Signal<YNotebook, NotebookChange> = ...
_disableDocumentWideUndoRedo: boolean
_metadataChanged: Signal<YNotebook, IMapChange<any>> = ...
_ycellMapping: WeakMap<YMap<any>, YCellType> = ...
_ycells: YArray<YMap<any>> = ...

Internal Yjs cells list

cells: YCellType[]

Cells list

version: string = '1.0.0'

Document version

ymeta: YMap<any> = ...

YJS map for the notebook metadata

Accessors

  • get ystate(): YMap<any>
  • Shared state

    Returns YMap<any>

Methods

  • Move cells.

    Parameters

    • fromIndex: number
    • toIndex: number
    • n: number = 1

    Returns void

  • Perform a transaction. While the function f is called, all changes to the shared document are bundled into a single event.

    Parameters

    • f: (() => void)
        • (): void
        • Returns void

    • undoable: boolean = true

    Returns void

Generated using TypeDoc