JSFiddle - React, Tailwind, and code Playground
by adardesign
HTML
<table id="table">
<tr>
<td><a href="mailto:[email protected]">[email protected]</a></td>
</tr>
</table>
JavaScript
var table = document.getElementById("table"),
links = table.getElementsByTagName("a"),
linksLength = links.length,
i = 0,
link,
href;
for(; i>linksLength; i++){
link = links[i];
href=link.href,
text = link.childNodes[0].nodeValue;
if(href.indexOf("mailto:")){
link.childNodes[0].nodeValue += text+ "<img src='path/to/email.png'>";
}
}