2012-08-14 04:03:06 +02:00
|
|
|
# editorInfo
|
2012-08-03 22:04:06 +02:00
|
|
|
|
2012-08-14 04:03:06 +02:00
|
|
|
## editorInfo.ace_replaceRange(start, end, text)
|
2012-08-03 22:04:06 +02:00
|
|
|
This function replaces a range (from `start` to `end`) with `text`.
|
|
|
|
|
2012-08-14 04:03:06 +02:00
|
|
|
## editorInfo.ace_getRep()
|
2012-08-03 22:04:06 +02:00
|
|
|
Returns the `rep` object.
|
|
|
|
|
2012-08-14 04:03:06 +02:00
|
|
|
## editorInfo.ace_getAuthor()
|
|
|
|
## editorInfo.ace_inCallStack()
|
|
|
|
## editorInfo.ace_inCallStackIfNecessary(?)
|
|
|
|
## editorInfo.ace_focus(?)
|
|
|
|
## editorInfo.ace_importText(?)
|
|
|
|
## editorInfo.ace_importAText(?)
|
|
|
|
## editorInfo.ace_exportText(?)
|
|
|
|
## editorInfo.ace_editorChangedSize(?)
|
|
|
|
## editorInfo.ace_setOnKeyPress(?)
|
|
|
|
## editorInfo.ace_setOnKeyDown(?)
|
|
|
|
## editorInfo.ace_setNotifyDirty(?)
|
|
|
|
## editorInfo.ace_dispose(?)
|
|
|
|
## editorInfo.ace_setEditable(bool)
|
|
|
|
## editorInfo.ace_execCommand(?)
|
|
|
|
## editorInfo.ace_callWithAce(fn, callStack, normalize)
|
|
|
|
## editorInfo.ace_setProperty(key, value)
|
|
|
|
## editorInfo.ace_setBaseText(txt)
|
|
|
|
## editorInfo.ace_setBaseAttributedText(atxt, apoolJsonObj)
|
|
|
|
## editorInfo.ace_applyChangesToBase(c, optAuthor, apoolJsonObj)
|
|
|
|
## editorInfo.ace_prepareUserChangeset()
|
|
|
|
## editorInfo.ace_applyPreparedChangesetToBase()
|
|
|
|
## editorInfo.ace_setUserChangeNotificationCallback(f)
|
|
|
|
## editorInfo.ace_setAuthorInfo(author, info)
|
|
|
|
## editorInfo.ace_fastIncorp(?)
|
|
|
|
## editorInfo.ace_isCaret(?)
|
|
|
|
## editorInfo.ace_getLineAndCharForPoint(?)
|
|
|
|
## editorInfo.ace_performDocumentApplyAttributesToCharRange(?)
|
2016-03-26 15:00:34 +01:00
|
|
|
## editorInfo.ace_setAttributeOnSelection(attribute, enabled)
|
|
|
|
Sets an attribute on current range.
|
|
|
|
Example: `call.editorInfo.ace_setAttributeOnSelection("turkey::balls", true); // turkey is the attribute here, balls is the value
|
|
|
|
Notes: to remove the attribute pass enabled as false
|
2012-08-14 04:03:06 +02:00
|
|
|
## editorInfo.ace_toggleAttributeOnSelection(?)
|
2016-03-26 15:00:34 +01:00
|
|
|
## editorInfo.ace_getAttributeOnSelection(attribute, prevChar)
|
2013-12-07 18:48:06 +01:00
|
|
|
Returns a boolean if an attribute exists on a selected range.
|
2016-03-26 15:00:34 +01:00
|
|
|
prevChar value should be true if you want to get the previous Character attribute instead of the current selection for example
|
|
|
|
if the caret is at position 0,1 (after first character) it's probable you want the attributes on the character at 0,0
|
2013-12-07 18:48:06 +01:00
|
|
|
The attribute should be the string name of the attribute applied to the selection IE subscript
|
|
|
|
Example usage: Apply the activeButton Class to a button if an attribute is on a highlighted/selected caret position or range.
|
2016-03-26 15:00:34 +01:00
|
|
|
Example `var isItThere = documentAttributeManager.getAttributeOnSelection("turkey::balls", true);`
|
|
|
|
|
2013-12-07 18:48:06 +01:00
|
|
|
See the ep_subscript plugin for an example of this function in action.
|
|
|
|
Notes: Does not work on first or last character of a line. Suffers from a race condition if called with aceEditEvent.
|
2012-08-14 04:03:06 +02:00
|
|
|
## editorInfo.ace_performSelectionChange(?)
|
|
|
|
## editorInfo.ace_doIndentOutdent(?)
|
|
|
|
## editorInfo.ace_doUndoRedo(?)
|
|
|
|
## editorInfo.ace_doInsertUnorderedList(?)
|
|
|
|
## editorInfo.ace_doInsertOrderedList(?)
|
|
|
|
## editorInfo.ace_performDocumentApplyAttributesToRange()
|
2012-10-02 02:14:27 +02:00
|
|
|
|
2012-10-01 00:13:14 +02:00
|
|
|
## editorInfo.ace_getAuthorInfos()
|
2012-10-02 02:18:19 +02:00
|
|
|
Returns an info object about the author. Object key = author_id and info includes author's bg color value.
|
2012-10-02 02:14:27 +02:00
|
|
|
Use to define your own authorship.
|
|
|
|
## editorInfo.ace_performDocumentReplaceRange(start, end, newText)
|
|
|
|
This function replaces a range (from [x1,y1] to [x2,y2]) with `newText`.
|
|
|
|
## editorInfo.ace_performDocumentReplaceCharRange(startChar, endChar, newText)
|
|
|
|
This function replaces a range (from y1 to y2) with `newText`.
|
|
|
|
## editorInfo.ace_renumberList(lineNum)
|
|
|
|
If you delete a line, calling this method will fix the line numbering.
|
2012-10-01 00:13:14 +02:00
|
|
|
## editorInfo.ace_doReturnKey()
|
2017-03-12 03:38:50 +01:00
|
|
|
Forces a return key at the current caret position.
|
2012-10-02 02:14:27 +02:00
|
|
|
## editorInfo.ace_isBlockElement(element)
|
2017-03-12 03:38:50 +01:00
|
|
|
Returns true if your passed element is registered as a block element
|
2012-10-02 02:14:27 +02:00
|
|
|
## editorInfo.ace_getLineListType(lineNum)
|
|
|
|
Returns the line's html list type.
|
2012-10-01 00:13:14 +02:00
|
|
|
## editorInfo.ace_caretLine()
|
2012-10-02 02:14:27 +02:00
|
|
|
Returns X position of the caret.
|
2012-10-01 00:13:14 +02:00
|
|
|
## editorInfo.ace_caretColumn()
|
2012-10-02 02:14:27 +02:00
|
|
|
Returns Y position of the caret.
|
2012-10-01 00:13:14 +02:00
|
|
|
## editorInfo.ace_caretDocChar()
|
2012-10-02 02:14:27 +02:00
|
|
|
Returns the Y offset starting from [x=0,y=0]
|
2012-10-01 00:13:14 +02:00
|
|
|
## editorInfo.ace_isWordChar(?)
|