Jquery highlight words in editable div
<p>I have an editable div and would like to highlight (apply a css class) to certain words WHILE the user is still typing in the div.</p>

<p>How would I do this using Jquery? </p>

<p>I tried using the <code>div.html().replace()</code> etc but it replaces it and then moves the cursor all the way back to the beginning.</p>
