JSFiddle - React, Tailwind, and code Playground
by Addy Osmani
HTML
<div id="asd" style="white-space: pre">
<span>Test</span> Content after
</div>
JavaScript
$('#asd').contents().each(function() {
// $(this).replaceWith('<span>Test</span>Content after');
$(this).replaceWith('<span><span>Test</span>Content after</span>');
return false;
});