get selected text's html in div
<p>i have a div with contentEditable set to true.
I have to find selected text html.I am able to get selected text in FireFox by</p>

<pre><code> window.getSelection();
</code></pre>

<p>I case of IE i am able to get selected text html by using</p>

<pre><code>document.selection.createRange().
</code></pre>

<p>But, how can i find selected text html in FireFox.
How can in do this.Please help.</p>
