JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>
<div class="main">
<!-- I'm a comment, exclude me -->
<div class="child" data-bind="exclude-me" style="background-color: gray; width: 250px;">
<span> I'm gray, copy me</span>
</div>
<!-- I'm a comment, exclude me -->
<div class="child" data-bind="exclude-me-too" style="background-color: pink; width: 250px;">
<span> I'm pink, copy me</span>
</div>
</div>
<textarea class="editor"></textarea>
CSS
.editor {
width: 100%;
height: 500px;
}
JavaScript
$('.editor').html($('.main').html());
$('.editor').on('input propertychange', function(){
$('.main').html($(this).val());
});