Class YFile

Shareable text file.

Hierarchy

Implements

Constructors

Properties

_changed: Signal<YFile, FileChange> = ...
version: string = '1.0.0'

Document version

ysource: YText = ...

YJS file text.

Accessors

  • get isDisposed(): boolean
  • Whether the document is disposed or not.

    Returns boolean

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

    Returns YMap<any>

Methods

  • Set the file text.

    Parameters

    • value: string

      New text

    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

  • Replace content from start' to endwithvalue`.

    Parameters

    • start: number
    • end: number
    • value: string = ''

    Returns void

Generated using TypeDoc