0

我在使用 ember-mobile-doc 编辑器的基本任务方面遇到了一些麻烦:我希望能够通过操作清除编辑器的内容。

和:

{{#mobiledoc-editor mobiledoc=document}}...{{#/mobiledoc-editor}

我尝试设置documentfalse, null,但没有任何运气。我查看了 github 上的代码寻找它,但似乎找不到前进的道路。

4

1 回答 1

1

由于我现在已经两次遇到这个问题,所以我需要回答它以节省我自己的麻烦。

jQuery版本:

import {run} from '@ember/runloop'
//inside component
   run(() => {
    $('.mobiledoc-editor__editor').empty();
   });
于 2018-05-10T10:01:21.350 回答