JSFiddle - React, Tailwind, and code Playground
by TJ Horner
HTML
Without noparse: <a href="http://example.com">Link</a>
<br/>
With noparse: <noparse><a href="http://example.com">Link</a></noparse>
JavaScript
//finds noparse and changes it
function findNoParse(){
$('noparse').each(function(){
if($(this).attr('tagchecked') != 'true'){ //checks if already changed tag
$(this).text($(this).html()); //makes the html into plaintext
$(this).attr('tagchecked', 'true'); //says that tag has been checked
}
});
}
//make sure to load when page is loaded
$(document).ready(function(){
findNoParse();
setInterval(findNoParse, 100); //constantly check for new tag, just in case a new element is put in.
});