Jump to content

Position text cursor within a textarea


george

Recommended Posts

Someone clicks a button, I display a textarea. The value of the textarea is "P.S. ". I place focus in the textarea when this button is clicked, but I want the text cursor to be after the "P.S. ". How can I place the text cursor where I want? TIA

Link to comment
Share on other sites

The short answer is NO.Chris, I've recently begun a study of documentRanges and treeWalkers. Very interesting stuff with lots of application to text regions outside of textareas per se. Imagine a web page that you can edit WYSIWYG style just by pointing your cursor and typing on it. Used correctly, it could really simplify wikis and stuff like that.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...