I want to get selection on page and replace by html string! How can do that in mozilla?
// IE example of add email link!
// Tab_html is a ContentEditable DIV
function add_emailLink(emailLink) {
var emailLink = document.selection.createRange();
sText.pasteHTML('<A HREF="mailto:' + emailLink.text + '">' + emailLink.text
+ '</A>')
Tab_html.focus();
}
Thank!
---------------------------------------
Benoit Quenneville
