Skip to content

Commit 36d067d

Browse files
committed
Fix up readme to include caret movement functions.
1 parent 71ad0fc commit 36d067d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Readme.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
caret
22
=====
33

4-
Listen to and inspect the browser caret.
4+
Listen to, inspect, and move the browser caret.
55

6-
View the [demo](http://adamsanderson.github.com/caret/) for an example of the information you can get.
6+
View the [demo](http://adamsanderson.github.com/caret/) for an example of the information and operations available.
77

88
This should work with IE8+ and all modern browsers.
99

@@ -25,6 +25,14 @@ API
2525

2626
**caret.textAfter()**: Returns the text after the caret within the current element.
2727

28+
**caret.moveToStart()**: Moves the caret to the beginning of the element that the `Caret` was initialized with.
29+
30+
**caret.moveToEnd()**: Moves the caret to the end of the element that the `Caret` was initialized with.
31+
32+
**caret.moveBefore(element)**: Moves the caret just before the `element`.
33+
34+
**caret.moveAfter(element)**: Moves the caret just after the `element`.
35+
2836
Examples
2937
--------
3038

0 commit comments

Comments
 (0)