JSFiddle - React, Tailwind, and code Playground

HTML

<div id='laptop'>laptop</div>

JavaScript

$('body *').each(function(){
     var txt = $(this).text();
    
    txt =  txt.replace('laptop', '<a href="http://test.com/laptop">laptop</a>');
    

    $(this).html(txt);
});