【发布时间】:2018-05-10 18:01:21
【问题描述】:
我在使用 ember-mobile-doc 编辑器的基本任务方面遇到了一些问题:我希望能够通过操作清除编辑器的内容。
与:
{{#mobiledoc-editor mobiledoc=document}}...{{#/mobiledoc-editor}
我尝试将document 设置为false、null,但没有任何运气。我浏览了github上的代码寻找它,但似乎找不到前进的道路。
【问题讨论】:
我在使用 ember-mobile-doc 编辑器的基本任务方面遇到了一些问题:我希望能够通过操作清除编辑器的内容。
与:
{{#mobiledoc-editor mobiledoc=document}}...{{#/mobiledoc-editor}
我尝试将document 设置为false、null,但没有任何运气。我浏览了github上的代码寻找它,但似乎找不到前进的道路。
【问题讨论】:
因为我现在已经两次遇到这个问题,所以我需要回答它以节省我自己的麻烦。
jQuery 版本:
import {run} from '@ember/runloop'
//inside component
run(() => {
$('.mobiledoc-editor__editor').empty();
});
【讨论】: