JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container">
<div id="one">test 1 </div>
<div id="two">test 2 </div>
<div id="three">test 3 </div>
<div id="four">test 4 </div>
</div>
<textarea id="save"></textarea>
CSS
#one, #two, #three, #four{
background:#ccc;
margin-bottom:10px;
height:20px;
}
textarea{
width:500px;
height:300px;
border:1px solid #ccc;
}
JavaScript
var x = $('#container').wrap('<p/>').parent().html();
$('#container').unwrap();
$('#save').val(x);