How to change color of selected text of textarea?
<p>I have <code>textarea</code> and i want to change color of selected text.
Example:</p>

<pre><code>var text = "abcdefg";
</code></pre>

<p>I want to change color of selected text <code>efg</code>.</p>

<p>here is my code:</p>

<pre><code>var input = document.getElementById('area');
var value = input.value.substr(input.selectionStart, input.selectionEnd - input.selectionStart);
$('#abc').find(value).attr('color',color);
</code></pre>