JSFiddle - React, Tailwind, and code Playground
by cgtrman
HTML
<textarea id="test" rows='16' style='width:500px;'>Name,<br /><br />Please print the files listed below.</textarea>
JavaScript
function replaceHtml(string_to_replace) {
return $("<div>").append(string_to_replace.replace(/ /g, ' ').replace(/<br.*?>/g, ' ')).text();
}
var str = $("#test").val();
$("#test").val(replaceHtml(str));