diff --git a/doc/api/editorInfo.md b/doc/api/editorInfo.md index 5a1f8b160..ce294a22d 100644 --- a/doc/api/editorInfo.md +++ b/doc/api/editorInfo.md @@ -49,7 +49,8 @@ prevChar value should be true if you want to get the previous Character attribut if the caret is at position 0,1 (after first character) it's probable you want the attributes on the character at 0,0 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. +Example `var isItThere = documentAttributeManager.getAttributeOnSelection("turkey::balls", true);` + 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(?)