Ok, I have 2 problems, I've gotten internet explore to replace selected text with the text from a div element but I haven't managed to do it with firefox (the 'no idea' bit) and ontop of that I can't for the life of me figure out how to get the styled text to be output from the div; I mean, that was the whole point of using the div so the text could be styled. Any ideas? Btw inputText is the reference to the div element.
The main area of problem is on the 5th to last line of this:
if (highlight){
if (ie){
document.selection.createRange().text = inputText.innerHTML;
}
else{
// (no idea!?!) = inputText.innerHTML;
}
inputText.parentNode.removeChild(inputText);
}