JSFiddle - React, Tailwind, and code Playground
HTML
®
JavaScript
$("*").each(function() {
if( ! $(this).children().length ) {
$(this).html(function(el, html){
return html.replace(/®/, '<sup>®</sup>');
});
}
});
alert( $('body').html() );