summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-12-07 17:48:06 +0000
committerJohn McLear <john@mclear.co.uk>2013-12-07 17:48:06 +0000
commitd9ef40f9d70f31c88945eeb9d3e3f82393ec39bf (patch)
treea308c5395eb5f99d331434caa888a80f959e7e6c /doc
parent8a547b24ba2500b27b433070a1e8019548103b09 (diff)
downloadetherpad-lite-d9ef40f9d70f31c88945eeb9d3e3f82393ec39bf.zip
docs but not sure how to specify the verison this was introduced
Diffstat (limited to 'doc')
-rw-r--r--doc/api/editorInfo.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/api/editorInfo.md b/doc/api/editorInfo.md
index 05656bce..31361a75 100644
--- a/doc/api/editorInfo.md
+++ b/doc/api/editorInfo.md
@@ -39,6 +39,13 @@ Returns the `rep` object.
## editorInfo.ace_performDocumentApplyAttributesToCharRange(?)
## editorInfo.ace_setAttributeOnSelection(?)
## editorInfo.ace_toggleAttributeOnSelection(?)
+## editorInfo.ace_getAttributeOnSelection(attribute)
+Returns a boolean if an attribute exists on a selected range.
+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.
+Example: `call.editorInfo.ace_getAttributeOnSelection("subscript");` // call here is the callstack from aceEditEvent.
+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.
## editorInfo.ace_performSelectionChange(?)
## editorInfo.ace_doIndentOutdent(?)
## editorInfo.ace_doUndoRedo(?)