Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim committed Nov 9, 2014
2 parents 062e29d + f379426 commit 86cf71c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Rangy Inputs

A small jQuery plug-in for selection and caret manipulation within textareas and text inputs.

Bower Install
-------------

[Bower](http://bower.io/) users can install by running `bower install rangyinputs --save`


Example
-------

Expand Down Expand Up @@ -47,7 +53,7 @@ Note that in IE the textarea or text input must have the focus before calling th
var sel = $("#test").getSelection();
alert(sel.start + ", " + sel.end);

###`setSelection(Number start, Number end)`
###`setSelection(Number start[, Number end])`

Selects the text within the text input or textarea element between the specified start and end character indices.

Expand Down Expand Up @@ -143,7 +149,7 @@ To do the same thing but select "baz" afterwards:

$("#test").replaceSelectedText("baz", "select");

###`surroundSelectedText(String textBefore, String textAfter)`
###`surroundSelectedText(String textBefore, String textAfter[, String selectionBehaviour])`

Surrounds the currently selected text in the text input or textarea element with the specified pieces of text and optionally updates the selection depending on the value of `selectionBehaviour`. Possible values are:

Expand Down

0 comments on commit 86cf71c

Please sign in to comment.