How do I copy the attributes of one element to another element?
HTML
I'm facing same problem and after invested lots of time and effort i am creating thisclone textarea into editable div with same attribute
select.getAttributeNames().forEach(attrName => { $(div).attr(attrName, inputData.getAttribute(attrName)); });