JSFiddle - React, Tailwind, and code Playground
HTML
<div id="div">
Here is the Converted :<span class="text"> Text</span> <br /><a href="javascript:void(0)">Link</a>
</div>
<br />
<input type="button" class="go" value="Convert to HTML ">
JavaScript
$.fn.toHtml=function(){
return $(this).html($(this).text())
}
$('.go').click(function(){
$('#div').toHtml()
});