Ace API Reference
    Preparing search index...

    Class AceEmmetEditor

    Implementation of IEmmetEditor interface for Ace

    Index

    Constructors

    Properties

    $syntax: string
    ace: Editor
    indentation: string

    Methods

    • Parameters

      • value: string

      Returns string

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

      Parameters

      • start: number
      • Optionalend: number

      Returns void

      editor.createSelection(10, 40);

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

      Returns string

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

      Returns any

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

      Returns string

      0.65

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

      Returns string

    • Returns current selection

      Returns string

      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

      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

      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

      • Optionalstart: number

        Start index of editor's content

      • Optionalend: number

        End index of editor's content

      • OptionalnoIndent: boolean

        Do not auto indent value

      Returns void

    • Set new caret position

      Parameters

      • index: number

        Caret position

      Returns void

    • Parameters

      • editor: Editor

      Returns void