I'm having some trouble with what should be a basic task using the ember-mobile-doc editor: I want to be able to clear the contents of the editor with an action.
with:
{{#mobiledoc-editor mobiledoc=document}}...{{#/mobiledoc-editor}
I've tried setting document
to false
, null
, without any luck. I've looked through the code on github looking for it, but can't seem to find a path forward.
Since I've now come upon this question twice, I need to answer it to save my self the hassle.
jQuery Version:
import {run} from '@ember/runloop'
//inside component
run(() => {
$('.mobiledoc-editor__editor').empty();
});