Hierarchy

  • EditorDriverInterface

Implemented by

Methods

  • Get left and top coordinates of the caret relative to the editor viewport.

    Parameters

    • position: number

    Returns {
        left: number;
        top: number;
    }

    • left: number
    • top: number
  • Get the last N characters from the current "text block".

    A textarea-based driver would just return the last N characters, but more advanced implementations might restrict to the current block.

    This is useful for monitoring recent user input to trigger autocomplete.

    Parameters

    • n: number

    Returns string

  • Insert content into the editor at the given position.

    Parameters

    • pos: number
    • text: string
    • escape: boolean

    Returns void

  • Insert content into the editor at the position of the cursor.

    Parameters

    • text: string
    • escape: boolean

    Returns void

  • Insert content into the editor between the given positions.

    If the start and end positions are different, any text between them will be overwritten.

    Parameters

    • start: number
    • end: number
    • text: string
    • escape: boolean

    Returns void

  • Replace existing content from the start to the current cursor position.

    Parameters

    • start: number
    • text: string
    • escape: boolean

    Returns void

Generated using TypeDoc v0.23.24