mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-27 02:46:15 -04:00
docs w/ improved method
This commit is contained in:
parent
add21368f9
commit
375ac50e14
1 changed files with 2 additions and 1 deletions
|
@ -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(?)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue