JSFiddle - React, Tailwind, and code Playground
HTML
<div>$</div>
JavaScript
$("*").contents().each(function() {
if(this.nodeType == 3)
this.nodeValue = this.nodeValue.replace("$", "R");
});
<div>$</div>
$("*").contents().each(function() {
if(this.nodeType == 3)
this.nodeValue = this.nodeValue.replace("$", "R");
});