JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/ui-lightness/jquery-ui.css">
start typeing in textarea whatever text you type it will also apear in div which has class <strong>'content'</strong> but when I press enter for new line in textarea when i get the problem div named <strong>'content'</strong> will not making new line please help
<br/>
<textarea name="description" rows="15" class="description"></textarea>
<p> </p>
<div class="description" >Texts Comes here</div>
JavaScript
$('.description:not(.focus)').keyup(function(){
var value = $(this).val();
var contentAttr = $(this).attr('name');
value.replace('[Bold]', '<strong>');
value.replace('[/Bold]', '</strong>');
value.replace('[Italic]', '<em>');
value.replace('[/Italic]', '</em>');
value.replace('[Underline]', '<u>');
value.replace('[/Underline]', '</u>');
$('.'+contentAttr+'').html(value.replace(/\r?\n/g,'<br/>'));
});