adam84 Posted August 28, 2008 Share Posted August 28, 2008 I have formatting buttons over top of a text area. When a user clicks on a button, I want to add the corresponding html tags around the selected text. Just like the 'start new topic' and 'reply' pages on this site. all I have been able to do is once I click the button, I can add the tag just to the end of the current string in the textarea. Any ideas? Quote Link to comment Share on other sites More sharing options...
emehrkay Posted August 28, 2008 Share Posted August 28, 2008 http://www.quirksmode.org/dom/range_intro.html sprinkle a lil regex around the selection and there you go 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.