PDA

View Full Version : insert text into an html file



sshankar
02-04-2007, 06:03 AM
I have an html page with text and images. I want the following functionality.

When The user selects some portion of text with the mouse, two tags should be inserted in the html file. One tag at the beginning of the selection as <para one> and the other tag at the end of the selected text as </para one>

The user should be prompted for the tag names when he selects the text with mouse and presses a submit button.

This way each selected portion of text will have start and end tags.
I shall then parse this html file for these tag names and store the tag names in a table for future use.
Please not the user should not see the html code but he should be viewing the file in a browser while doing this insertion.

Please help with suitable javascript or vbscript code.

Thanks

Bob90
02-07-2007, 03:11 AM
Sounds like a wysiwyg editor to me. I'm sure you can find one on google somewhere.
Do you need one online?