Ute
09-17-2003, 01:41 PM
Hi,
I would like to build a script that can find out which part of the contents of a textfield was selected by a user and put html-strings in front and behind that selection onclick of a button.
For example:
The user enters a text into the textfield. He then selects a part of this text and clicks on a button and the javascript puts a <b> tag in front of the selected string and a </b> tag behind it.
I don't know whether this is at all possible or how simple that is. Sorry if this is very basic.
Thank you for any help.
Regards,
Ute
I would like to build a script that can find out which part of the contents of a textfield was selected by a user and put html-strings in front and behind that selection onclick of a button.
For example:
The user enters a text into the textfield. He then selects a part of this text and clicks on a button and the javascript puts a <b> tag in front of the selected string and a </b> tag behind it.
I don't know whether this is at all possible or how simple that is. Sorry if this is very basic.
Thank you for any help.
Regards,
Ute