我在使用 ember-mobile-doc 编辑器的基本任务方面遇到了一些麻烦:我希望能够通过操作清除编辑器的内容。
跟:
{{#mobiledoc-editor mobiledoc=document}}...{{#/mobiledoc-editor}
我尝试将document
设置为false
,null
,没有任何运气。我已经浏览了github上的代码寻找它,但似乎找不到前进的道路。
由于我已经两次遇到这个问题,我需要回答它以节省我的麻烦。
j查询版本:
import {run} from '@ember/runloop'
//inside component
run(() => {
$('.mobiledoc-editor__editor').empty();
});