(function(A,_aoUndefined){A.extend(QMEditor.CONST.LANGUAGE.zh_CN,{FUN_PHOTO:"图片"});QMEditor.FUNCLIB.Photo=QMEditor.FUNCLIB.inheritFrom(function(_aoParamSet){this.setBindEditor(_aoParamSet.editor);var _oSelf=this,_oLang=_oSelf.getBindEditor().getLanguage();_oSelf.setId("Photo");_oSelf.setType("btn");_oSelf.setUiConfig({arrowPos:1,name:"photo",title:_oLang.FUN_PHOTO,label:_oLang.FUN_PHOTO});_oSelf.setfDoDefaultClick(function(_aoEvent){if(_aoEvent.target==_oSelf._moContainer.firstChild){A.preventDefault(_aoEvent);A.stopPropagation();_oSelf.getBindEditor().requireLocalImageByClient()}})},QMEditor.FUNCLIB.BASE);(function(){QMEditor.setupFunc()})()})(QMEditorAdapter);(function(A,_aoUndefined){A.extend(QMEditor.CONST.LANGUAGE.zh_CN,{FUN_SCREENSNAP:"屏幕截图"});QMEditor.FUNCLIB.ScreenSnap=QMEditor.FUNCLIB.inheritFrom(function(_aoParamSet){this.setId("ScreenSnap");this.setType("btn");this.setBindEditor(_aoParamSet.editor);this._updateUIInfo();var _oSelf=this;_oSelf.setfDoDefaultClick(function(_aoEvent){if(_aoEvent.target==_oSelf._moContainer.firstChild){A.preventDefault(_aoEvent);A.stopPropagation();_oSelf.getBindEditor().requireScreeSnapByClient()}})},QMEditor.FUNCLIB.BASE);QMEditor.FUNCLIB.ScreenSnap.prototype._updateUIInfo=function(){var _oLang=this.getBindEditor().getLanguage();this.setUiConfig({name:"screensnap",title:_oLang.FUN_SCREENSNAP,label:_oLang.FUN_SCREENSNAP})};(function(){QMEditor.setupFunc()})()})(QMEditorAdapter);(function(A,_aoUndefined){A.extend(QMEditor.CONST.LANGUAGE.zh_CN,{FUN_UNDO:"撤销",FUN_UNDO_LABEL:"撤销"});QMEditor.FUNCLIB.Undo=QMEditor.FUNCLIB.inheritFrom(function(_aoParamSet){var _oSelf=this;this.setId("Undo");this.setCmd("undo");this.setType("btn");this.setBindEditor(_aoParamSet.editor);this.setUiConfig(A.extend(this.getUiConfig(),{name:"undo",title:this.getBindEditor().getLanguage().FUN_UNDO,label:this.getBindEditor().getLanguage().FUN_UNDO_LABEL}));this.setfDoDefaultClick(function(_aoEvent){if(this._mbEnableUndo){A.stopPropagation();A.preventDefault(_aoEvent);var _oEditor=this.getBindEditor();_oEditor._moEditDoc.execCommand("undo");_oEditor.hideMenu();if(external&&external.RequireUndo){external.RequireUndo();_oEditor._CreateFrames()}}});function _handUndoWhetherEnable(_oDom){if(!this._mbEnableUndo){this._mbEnableUndo=true;A.setClass(_oDom,_oDom.className.replace("qmEditorUndo_disable","")+"qmEditorUndo")}}this.init_=function(){function _disableUndoState(){this._mbEnableUndo=false;var _oDom=this._moContainer?_oSelf._moContainer.firstChild:null;if(-1!=_oDom.className.search(/\bqmEditorUndo\b/)){A.setClass(_oDom,_oDom.className.replace("qmEditorUndo","")+"qmEditorUndo_disable")}}_disableUndoState.call(_oSelf);var _oEditor=_oSelf.getBindEditor();if(_oEditor){_oEditor.addEventObserver("ContentEditableChange",function(_oParams){if(_oParams&&!_oParams["editable"]){_disableUndoState.call(_oSelf)}});_oEditor.addEventObserver("LoadHTMLContentDone",function(_oParams){A.addEvent(_oEditor._moEditBody,"input",function(_aoEvent){_handUndoWhetherEnable.call(_oSelf,_oSelf._moContainer.firstChild)})});A.addEvent(_oEditor._moEditTitle,"input",function(_aoEvent){_handUndoWhetherEnable.call(_oSelf,_oSelf._moContainer.firstChild)});A.addEvent(_oEditor._moEditBody,"input",function(_aoEvent){_handUndoWhetherEnable.call(_oSelf,_oSelf._moContainer.firstChild)})}}},QMEditor.FUNCLIB.BASE);(function(){QMEditor.setupFunc()})()})(QMEditorAdapter);