Options
All
  • Public
  • Public/Protected
  • All
Menu

Class YDocument<T>

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _changed

_changed: Signal<YDocument<T>, T>

awareness

awareness: Awareness

isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

source

source: YText

undoManager

undoManager: UndoManager

ydoc

ydoc: Doc

ystate

ystate: YMap<any>

Accessors

changed

  • get changed(): ISignal<this, T>
  • The changed signal.

    Returns ISignal<this, T>

Methods

canRedo

  • canRedo(): boolean
  • Whether the object can redo changes.

    Returns boolean

canUndo

  • canUndo(): boolean
  • Whether the object can undo changes.

    Returns boolean

clearUndoHistory

  • clearUndoHistory(): void

dispose

  • dispose(): void
  • Dispose of the resources.

    Returns void

redo

  • redo(): void
  • Redo an operation.

    Returns void

transact

  • transact(f: () => void, undoable?: boolean): 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

    • Optional undoable: boolean

    Returns void

undo

  • undo(): void
  • Undo an operation.

    Returns void

Generated using TypeDoc