assasin Posted September 14, 2006 Share Posted September 14, 2006 I need a script that will store the location of the cursor so when a button is clicked it can insert some text where the cursor was in the txt box.Here is a [url=http://experts.about.com/q/Javascript-1520/Inserting-text-text-area.htm]link to a script[/url] I found by googleing but it only works in IE and I need mine to work in FIreFox and IE.Basicly I am making a BB code WYSIWYG interface! so when say a smiley image is clicked the html will be inserted into the text box at the cursors last location.Can anyone help? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 20, 2006 Share Posted September 20, 2006 I suggest you take a look here: [url=http://www.bazon.net/mishoo/articles.epl?art_id=1292]http://www.bazon.net/mishoo/articles.epl?art_id=1292[/url].Basically, you need to use a TextRange in IE, and handle the selection in FF. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.