Call setSelectionRange() on the input element to select some of the text