JSFiddle - React, Tailwind, and code Playground

by Renilson Meneguci

HTML

<textarea rows="4" cols="50" id="txtInput">
Testando textarea stackoverflow. 
</textarea>
<br/>
<input type="button" value="Selecionar" id="btnSelecionar"/>

JavaScript

$('#btnSelecionar').click(function(){
$('#txtInput').select();
});