JSFiddle - React, Tailwind, and code Playground
by Shibin Ragh
HTML
<textarea name="" id="" cols="30" rows="10"></textarea>
<div class="content">
Live textarea content here
</div>
JavaScript
$('textarea').keyup(function(e){
console.log(e)
let content = e.target.value.replace(/\r\n|\r|\n/g, "<br />")
$('.content').html(content);
});