JSFiddle - React, Tailwind, and code Playground

HTML

<div class="wrapper">
    <img src"">
  </div>
  <div class="button">Remove wrapper</div>

JavaScript

$('.button').click(function(){
    $('.wrapper img').unwrap();
    alert($('body').html());
});