JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test-div">
http://<strong>somewebsite.com</strong>/big/long/unfriendly/path/
</div>
JavaScript
$("#test-div").contents()[0].textContent="Something";
<div id="test-div">
http://<strong>somewebsite.com</strong>/big/long/unfriendly/path/
</div>
$("#test-div").contents()[0].textContent="Something";