我在使用ember-mobile-doc编辑器进行基本任务时遇到了一些麻烦:我希望能够通过操作清除编辑器的内容。
with:
{{#mobiledoc-editor mobiledoc=document}}...{{#/mobiledoc-editor}
我尝试将document
设置为false
,null
,但没有任何运气。我已经查看了github上的代码,但似乎无法找到前进的道路。
答案 0 :(得分:1)
由于我现在两次提出这个问题,我需要回答这个问题以免自己麻烦。
jQuery版本:
import {run} from '@ember/runloop'
//inside component
run(() => {
$('.mobiledoc-editor__editor').empty();
});