I'm using similiar javascript function that "add emoticons" aka emoticons on this page, to add some special strings to textarea.
It allways adds the strings to the end of the existing text. I'd like to know if it's possible for javascript to detect the position of the cursor in the textarea and add strings into that position, into middle of the existing text?
Alternatively, id like to add the chosen string to clippoard, so it can be pasted where wanted. Is it possible to add stuff to clipboard by javascript?
JavaScript: add text to textbox
Moderator: General Moderators
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
http://www.alexking.org/blog/2003/06/02 ... avascript/
clipboard: only possible in IE that I know of.. through execommand() or something..
clipboard: only possible in IE that I know of.. through execommand() or something..
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am