Stop, start, and destroy

API Commands

Code

<!-- buttons -->
<button onclick="stopEditor(event)">stop</button>
<button onclick="startEditor(event)">start</button>
<button onclick="destroyEditor(event)">destroy</button>

<!-- element -->
<textarea id="entry">...</textarea>

<!-- call -->
<script>
let app = Redactor('#entry');

function stopEditor(e) {
    e.preventDefault();
    app.stop();
}

function startEditor(e) {
    e.preventDefault();
    app.start();
}

function destroyEditor(e) {
    e.preventDefault();
    app.destroy();
}
</script>