JSFiddle - React, Tailwind, and code Playground
HTML
<div class="modal-header">
<h2 class="tc_pageheader editableName" id="DetailsHeader"></h2>
</div>
JavaScript
$(document).ready(function(){
var h2 = $(".modal-header > h2").attr("id");
if ($("#" + h2).text() == "")
$("#" + h2).html("You are no more empty!");
});