B2G/gecko/browser/devtools/scratchpad/scratchpad.js
/**
   * Insert text at the current caret location.
   *
   * @param string aText
   *        The text you want to insert.
   */
Insert text at the current caret location.
@param string aText
The text you want to insert.
Insert text at the current caret location . @param string aText The text you want to insert .
function SP_insertTextAtCaret(aText)
  {
    let caretOffset = this.editor.getCaretOffset();
    this.setText(aText, caretOffset, caretOffset);
    this.editor.setCaretOffset(caretOffset + aText.length);
  }
function SP_insertTextAtCaret ( aText ) { let caretOffset = this . editor . getCaretOffset ( ) ; this . setText ( aText , caretOffset , caretOffset ) ; this . editor . setCaretOffset ( caretOffset + aText . length ) ; }
Insert text at the current caret location.
Insert text at the current caret location .