Javascript document.getSelection
<p>I'm trying to use the document.getSelection to select text I have entered in an text area for a WYSIWYG editor. It only works if you select text outside the text area though. I don't know if there is a way you can make it select text inside the text area?</p>

<p>Below is the text area for a WYSIWYG text editor:</p>

<pre><code>&lt;iframe id="editor" width="100%" height="400px" contentEditable="true"&gt;&lt;/iframe&gt;
</code></pre>
