Possible Duplicate:
how can i get cursor position in a textarea?
I want some basic but common operations on textarea with javascript, such as
- get the cursor position
- set the cursor position
- insert some text to the cursor position
- select all text in textarea
- select a range of text
- insert some text to the cursor position, and select it immediately.
I hope it working cross-browers.
Is there such javascript library?