using jquery to operate sth on selected input parts
<p>My goal is to change the font-format of the selected part of the input text using jQuery.
plz show me the way that works in firefox(if there isn't a way for it doesn't matter...). my problem is getting the selected part (ranges) and working with that ranges but i am not sure if its this way.plz show me the way.</p>

<pre><code> var userSelection;
 if (window.getSelection) {
     userSelection = window.getSelection();
 } else if (document.selection) { // Opera
     userSelection = document.selection.createRange();
 }
</code></pre>

<p>i am designing a full text editor using html.</p>