export default {
  run(editor, sender, opts = {}) {
    const modal = editor.Modal;
    const am = editor.AssetManager;
    const config = am.getConfig();
    const title = opts.modalTitle || editor.t('assetManager.modalTitle') || '';
    const types = opts.types;
    const accept = opts.accept;

    am.setTarget(opts.target);
    am.onClick(opts.onClick);
    am.onDblClick(opts.onDblClick);
    am.onSelect(opts.onSelect);

    if (!this.rendered || types) {
      let assets = am.getAll().filter(i => i);

      if (types && types.length) {
        assets = assets.filter(a => types.indexOf(a.get('type')) !== -1);
      }

      am.render(assets);
      this.rendered = am.getContainer();
    }

    if (accept) {
      const uploadEl = this.rendered.querySelector(
        `input#${config.stylePrefix}uploadFile`
      );
      uploadEl && uploadEl.setAttribute('accept', accept);
    }

    modal.open({ title, content: this.rendered });
    return this;
  }
};

@@ -897,16 +897,23 @@
    modal
+%0A      
 .open(%7B 
@@ -948,25 +948,158 @@
 d %7D)
-;%0A    return this
+%0A      .onceClose(() =%3E editor.stopCommand(this.id));%0A    return this;%0A  %7D,%0A%0A  stop(editor) %7B%0A    const %7B Modal %7D = editor;%0A    Modal && Modal.close()
 ;%0A  

Add stop command to openAssets