JSFiddle - React, Tailwind, and code Playground

HTML

<p>Hello <a href="http://ejohn.org/">John</a>, how are you doing?</p>

JavaScript

$("p").contents().not("[nodeType=1]").wrap("<b/>");