From 375ac50e141ca31e25f98c1c2a1d940b0cf996a4 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 26 Mar 2016 11:03:51 +0800 Subject: [PATCH] docs w/ improved method --- doc/api/editorInfo.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(?)