Click to See Complete Forum and Search --> : getting marked text


michelle
08-26-2003, 07:04 AM
<span id="myText">This is my text</span>

I mark a part of this text with the cursor, so that I can copy it or whatever.
Is there any way I can get the text I have marked into a variable, and/or the id of the span? Maybe even getting start and end positions in the string for the marked area?

What I would like to do is this:
I mark the word "my" in the text and then I will make that bold using some sort of regular expression perhaps.

I know Yahoo and hotmail uses this for writing html-mails.

Any thoughts?
// Michelle