Using Textbox.io - Getting Content

HTML

<script src="https://s3.amazonaws.com/ephox-static-ephox-com/jsfiddle/textboxio/textboxio.js"></script>
<div id="editableDiv">
    <p>Div content.</p>
</div>
<textarea rows=4></textarea>
<textarea rows=4></textarea>
<button id="getContentButton">Get Content</button>

CSS

#editableDiv {
    margin:10px 0;
    height:200px;
}

JavaScript

// Create a Textbox.io Editor for the matched element
var divEditor = textboxio.replace('#editableDiv');

document.getElementById('getContentButton').onclick = function() {
    // Get & Alert editor content
    var content = divEditor.content.get();
    alert(content);
    
};

//textboxio.replace('textarea');
$.each("textarea", function(){
var t = textboxio.replace($(this));
t.content.set("");
})