JSFiddle - React, Tailwind, and code Playground
HTML
<textarea name="myTextarea" rows=4 cols=5 maxlength=250></textarea>
JavaScript
var text= "line1 line2 line3";
text= text.replace(/\s/g, "\r");
$('textarea[name=myTextarea]').val(text);