Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BasicEditorDriver

Implements

Index

Constructors

constructor

Properties

el

Methods

Protected build

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): void

insertAtCursor

  • insertAtCursor(text: string): void

insertBetween

  • insertBetween(selectionStart: number, selectionEnd: number, text: string): void

Protected keyHandlers

moveCursorTo

  • moveCursorTo(position: number): void

replaceBeforeCursor

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

Protected setSelectionRange

  • setSelectionRange(start: number, end: number): void

Generated using TypeDoc version 0.22.10