import E from 'wangeditor';

const { BtnMenu } = E;

class PreViewMenu extends BtnMenu {
  constructor(editor) {
    // data-title属性表示当鼠标悬停在该按钮上时提示该按钮的功能简述
    const $elem = E.$(
      `<div class="w-e-menu" data-title="预览">
            <i>预览</i>
          </div>`,
    );
    super($elem, editor);
    this.editor = editor;
    // <i class="w-e-icon-fullscreen"></i>
  }

  static preview() {}

  clickHandler() {
    PreViewMenu.preview(this.editor.txt.html());
  }

  tryChangeActive() {}
}

export default PreViewMenu;
