Window with Editor

HTML

<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.1.319/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.1.319/styles/kendo.metro.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.kendostatic.com/2013.1.319/js/kendo.all.min.js"></script>
<div id='container'>
    <button data-bind='click:showWindow'>showWindow</button>
</div>

JavaScript

var winContent = "<div id='window' style='width:600px;height:400px;display:none;'><textarea id='popupEditor'></textarea><button id='btnClose'>close</button></div>";

var vm = new kendo.observable({
    showWindow: function (e) {
        var win = $(winContent).kendoWindow({
            actions:{},
            title:'hello',
            deactivate: function () {
                //lets make sure we get rid of the whole thing  
                console.log('deactive');
                this.element.closest(".k-window").remove();
            }
        }).getKendoWindow().center().open();
        
        $('#btnClose').click(function (e) {
            $(this).closest('#window').getKendoWindow().close();
        });
    }
});
kendo.bind($('#container'), vm);