JSFiddle - React, Tailwind, and code Playground

HTML

®

JavaScript

$("*").each(function() { 
    if( ! $(this).children().length ) { 
        $(this).html(function(el, html){
            return html.replace(/®/, '<sup>&reg;</sup>'); 
        });
    } 
});



alert( $('body').html() );