JSFiddle - React, Tailwind, and code Playground
by matthewbj
HTML
<p>My email is: <span class="mailto">account</span></p>
<p>My other email is: <span class="mailto">another</span></p>
JavaScript
$('.mailto').each(function() {
var account = $(this).text();
$(this).html(
'<a href="mailto:'
+ account
+ '@gmail.com">'
+ account
+ '@gmail.com</a>'
);
});