JSFiddle - React, Tailwind, and code Playground
HTML
<p>Hello</p>
<p>Here is a paragraph</p>
<p>And Another</p>
JavaScript
$("p").replaceWith (function(i,content){
return "<button>" + content + "</button>" ;
});
<p>Hello</p>
<p>Here is a paragraph</p>
<p>And Another</p>
$("p").replaceWith (function(i,content){
return "<button>" + content + "</button>" ;
});