Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Highlighted text in an edit box

Status
Not open for further replies.

CodeDependent

Programmer
Mar 5, 2002
1
US
I need to find a way to allow a user to selcet sentences within a multiedit box. The user can click on buttons which would format the highlighted text. Example, clicking on the BOLD buttom would enter opening and closing tags around the highlighted text. Can anyone give me any pointers on how to do this?? How can I determine what was selected in the edit box???
 
Check out GetSelection() at Javascript documentation. (The site is down right now so I can't go there).

See thread216-30035 -

For your need, it should be a simple matter to take the selected text and wrap HTML tags around it. If you have any trouble, let us know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top