• Inserts text into the editor (unless it's read-only) while keeping undo/redo history. Focuses the textarea if it isn't already.

    Parameters

    • editor: PrismEditor

      Target editor.

    • text: string

      Text to insert.

    • Optional start: null | number

      Position to start the insertion. Defaults to selectionStart.

    • Optional end: null | number

      Position to end the insertion. Defaults to start if specified, else selectionEnd.

    • Optional newCursorStart: null | number

      New starting position for the cursor. Defaults to the end of the inserted text.

    • Optional newCursorEnd: null | number

      New ending position for the cursor. Defaults to newCursorStart.

    Returns void

Generated using TypeDoc