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? Link to comment https://forums.phpfreaks.com/topic/20764-cursor-location-store-and-return-help/ 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. Link to comment https://forums.phpfreaks.com/topic/20764-cursor-location-store-and-return-help/#findComment-95288 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.