/* global UE, addStyle */
UE.plugins['135editor'] = function () {
  var editor = this
  editor.commands['135editor'] = {
    execCommand: function (cmd, name) {
      var dialog = new UE.ui.Dialog({
        iframeUrl: './lib/neditor/com.zving/135editor/editor.html',
        editor: editor,
        name: '135editor',
        title: '135编辑器',
        cssRules: 'width: ' + (window.innerWidth - 60) + 'px;' + 'height: ' + (window.innerHeight - 60) + 'px;'
      })
      dialog.render()
      dialog.open()
    }
  }
}
addStyle('.edui-notadd .edui-toolbar .edui-button.edui-for-135editor .edui-button-wrap{background-image:url("./lib/neditor/com.zving/images/icons-editor.png");background-position:0 0px;background-repeat: no-repeat;}')
addStyle('.edui-notadd .edui-toolbar .edui-button.edui-for-135editor .edui-state-disabled .edui-button-wrap{background-position:0 -32px;}')
