import { Command } from '@ckeditor/ckeditor5-core';
import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
import * as QMSCKEditorService from '../common/qmsCKEditorService';

export default class LoadTemplateDialogCommand extends Command {

	execute() {
    QMSCKEditorService.loadTemplateNotify(null);
    window.addEventListener(QMSCKEditorConstant.QMSCK_LOAD_TEMPLATE_PLUGIN_RESP, function (evt) {
        editor.setData(evt.detail);
    }, { once: true });
	}
}

