JavaScript Editor
Invoke the destroy method of the jqxEditor. Author: http://jqwidgets.com
by mark edwards
HTML
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id="editor" contenteditable='false'> <strong>Editor Value</strong>
</div>
<br/><br/>
<button id='destroyButton'>Destroy</button>
JavaScript
$('#editor').jqxEditor({
height: 400,
width: 800,
theme: 'energyblue'
});
$("#destroyButton").jqxButton({
theme: 'energyblue'
});
$("#destroyButton").click(function () {
console.log('shit');
console.log( $('#editor').attr('contenteditable') );
console.log('shit');
$('#editor').attr('contenteditable', false)
console.log( $('#editor').attr('contenteditable') );
$('#editor').jqxEditor('destroy');
});