Implementation of IEmmetEditor interface for Ace

Constructors

Properties

$syntax: string
ace: Editor
indentation: string

Methods

  • Creates selection from start to end character indexes. If end is ommited, this method should place caret and start index

    Parameters

    • start: number
    • Optional end: number

    Returns void

    Example

    editor.createSelection(10, 40);

    //move caret to 15th character
    editor.createSelection(15);
  • Returns current caret position

    Returns number

  • Returns content of current line

    Returns string

  • Returns current line's start and end indexes as object with start and end properties

    Returns any

    Example

    var range = editor.getCurrentLineRange();
    alert(range.start + ', ' + range.end);
  • Returns current editor's file path

    Returns string

    Since

    0.65

  • Returns current output profile name (@see emmet#setupProfile)

    Returns string

  • Returns current selection

    Returns string

    Since

    0.65

  • Returns character indexes of selected text: object with start and end properties. If there's no selection, should return object with start and end properties referring to current caret position

    Returns any

    Example

    var selection = editor.getSelectionRange();
    alert(selection.start + ', ' + selection.end);
  • Returns current editor's syntax mode

    Returns string

  • Ask user to enter something

    Parameters

    • title: string

      Dialog title

    Returns string

    Entered data

    Since

    0.65

  • Replace editor's content or it's part (from start to end index). If value contains caret_placeholder, the editor will put caret into this position. If you skip start and end arguments, the whole target's content will be replaced with value.

    If you pass start argument only, the value will be placed at start string index of current content.

    If you pass start and end arguments, the corresponding substring of current target's content will be replaced with value.

    Parameters

    • value: string

      Content you want to paste

    • Optional start: number

      Start index of editor's content

    • Optional end: number

      End index of editor's content

    • Optional noIndent: boolean

      Do not auto indent value

    Returns void

  • Set new caret position

    Parameters

    • index: number

      Caret position

    Returns void

Generated using TypeDoc