Debt Consolidation - Valentine Gifts For Him - Free Credit Report - Expekt bonuses - Web Hosting

PDA

View Full Version : add custom tags to text


firefoxguy
Apr 27th 2006, 12:39 am
Hi all,

I'm creating a firefox extention where i want to highlight some text when the user selects it.

Now i am able to grab the selected text using

window.getSelection() method

but i dont know how to add html tags to this text in order to keep this text highlighted.

Any help would be great

dexfantasy
Apr 28th 2006, 2:43 pm
Not sure how to do this but you may want to check out

https://addons.mozilla.org/extensions/moreinfo.php?id=791

From what you are describing, it sounds like this extension already does what you want. If it's not to convoluted, you can sift through the XPI for the code you need.

Good luck,

Dex

firefoxguy
Apr 30th 2006, 6:33 pm
Thanks for that, It really helped me a lot