Implement text selection.