【问题标题】:Clear Ember MobileDoc-kit Editor Data清除 Ember MobileDoc-kit 编辑器数据
【发布时间】:2018-05-10 18:01:21
【问题描述】:

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

与:

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

我尝试将document 设置为falsenull,但没有任何运气。我浏览了github上的代码寻找它,但似乎找不到前进的道路。

【问题讨论】:

    标签: ember.js mobiledoc-kit


    【解决方案1】:

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

    jQuery 版本:

    import {run} from '@ember/runloop'
    //inside component
       run(() => {
        $('.mobiledoc-editor__editor').empty();
       });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-07
      • 2012-10-30
      相关资源
      最近更新 更多