JSFiddle - React, Tailwind, and code Playground

HTML

<input id="what" value="hey">

JavaScript

$('input').each(function() {

        var attrs = {};        
        
        $.each(this.attributes, function() {
           attrs[this.name] = this.value;
        });
        
        $(this).replaceWith($('<textarea>').prop(attrs));
    });