question: how to implement text selection and replace worthwhile functions similar to rich text editors?
 var word = window.getSelection?window.getSelection():document.selection.createRange();
 alert(word); using the above api, you can get the selected value, but how do you get the exact location of the selected value and replace it?
