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 source(): string
  • File text

    Returns string

  • set source(v: string): void
  • Text

    Parameters

    • v: string

    Returns void

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

    Returns YMap<any>

Methods

  • 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
    • origin: any = null

    Returns void

  • Replace content from start' to endwithvalue`.

    Parameters

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

    Returns void

Generated using TypeDoc