code: function () {
          const editor = this.editor
          const $toolbarElem = editor.$toolbarElem
          const menus = this.menus
          const config = editor.config
          // config.zIndex 是配置的编辑区域的 z-index，菜单的 z-index 得在其基础上 +1
          const zIndex = config.zIndex + 1
          objForEach(menus, (key, menu) => {
              const $elem = menu.$elem
              if ($elem) {
                  // 设置 z-index
                  $elem.css('z-index', zIndex)
                  $toolbarElem.append($elem)
              }
          })
      }
docs: 添加到菜单栏