Is it possible with pure JavaScript, to select part of a text within a and through a function, return the number of characters that were selected?
For the example below, selecting "banana" somehow returns "Total Chars Selected: 6 chars".
<textarea id="my_textarea" name="my_textarea" rows="10" cols="50">Apple Banana Orange</textarea>
Intended Result: