Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EditorDriverInterface

Hierarchy

  • EditorDriverInterface

Implemented by

Index

Methods

destroy

  • destroy(): void

disabled

  • disabled(disabled: boolean): void

focus

  • focus(): void

getCaretCoordinates

  • getCaretCoordinates(position: number): { left: number; top: number }

getLastNChars

  • getLastNChars(n: number): string
  • 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

getSelectionRange

  • getSelectionRange(): number[]

insertAt

  • insertAt(pos: number, text: string, escape: boolean): void

insertAtCursor

  • insertAtCursor(text: string, escape: boolean): void

insertBetween

  • insertBetween(start: number, end: number, text: string, escape: boolean): 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

moveCursorTo

  • moveCursorTo(position: number): void

replaceBeforeCursor

  • replaceBeforeCursor(start: number, text: string, escape: boolean): void

Generated using TypeDoc version 0.22.10