JSFiddle - React, Tailwind, and code Playground

HTML

<div>Test</div>

JavaScript

$(function () {
   $('*:contains("Test")').html('<h1>Test</h1>'); 
});