| Function Summary | |
canonicalizePositionIe_(?Element textfield, number pos) ⇒ numberHelper function for canonicalizing a position inside a textfield in IE. Deals with the issue that \r\n counts as 2 characters, but move('character', n) passes over both characters in one move. | |
getEnd(?Element textfield) ⇒ numberReturns the place where the selection ends inside a textarea or a text input | |
getEndPoints(?Element textfield) ⇒ ?ArrayReturns the start and end points of the selection inside a textarea or a text input. | |
getEndPointsTextareaIe_(?TextRange range, ?TextRange selRange, boolean getOnlyStart) ⇒ ?ArrayReturns the start and end points of the selection within a textarea in IE. IE treats newline characters as \r\n characters, and we need to check for these characters at the edge of our selection, to ensure that we return the right cursor position. | |
getEndPoints_(?Element textfield, boolean getOnlyStart) ⇒ ?ArrayReturns the start and end points of the selection inside a textarea or a text input. | |
getRangeIe_(?Element el) ⇒ ?ArrayHelper function for returning the range for an object as well as the selection range | |
getSelectionRangeText_(?TextRange selRange) ⇒ stringReturns the selected text within a textarea in IE. IE treats newline characters as \r\n characters, and we need to check for these characters at the edge of our selection, to ensure that we return the right string. | |
getStart(?Element textfield) ⇒ numberReturn the place where the selection starts inside a textarea or a text input | |
getText(?Element textfield) ⇒ stringReturns the selected text inside a textarea or a text input | |
setCursorPosition(?Element textfield, number pos)Sets the cursor position within a textfield. | |
setEnd(?Element textfield, number pos)Sets the place where the selection should end inside a text area or a text input | |
setStart(?Element textfield, number pos)Sets the place where the selection should start inside a textarea or a text input | |
setText(?Element textfield, string text)Sets the selected text inside a textarea or a text input | |
useSelectionProperties_(?Element el) ⇒ booleanHelper function to determine whether it's okay to use selectionStart/selectionEnd. | |