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
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