var _e = this.editor; var _c = this.command; if(!_e){ return; } if(!_e.isLoaded){ return; } if(!_c.length){ return; } if(this.button){ try{ var enabled = _e.queryCommandEnabled(_c); this.button.setAttribute('disabled', !enabled); if(typeof this.button.checked == 'boolean'){ this.button.setAttribute('checked', _e.queryCommandState(_c)); } }catch(e){ console.debug(e); } }