JSFiddle - React, Tailwind, and code Playground
by riyadh
HTML
<div id="content">
<textarea>How about it</textarea><br/>
<textarea>Add
or\\\
dfdd
line</textarea>
</div>
JavaScript
$('#content').on( 'change keyup keydown paste cut', 'textarea', function (){
$(this).height(0).height(this.scrollHeight);
}).find( 'textarea' ).change();