signset.js 476 B

1234567891011121314
  1. UE.commands['signset'] = {
  2. execCommand : function(){
  3. alert('123');
  4. },
  5. queryCommandState:function(){
  6. var images = this.document.getElementsByTagName("img" );
  7. for(var i=0;i<$(images).length;i++){
  8. if($(images[i]).css("width")!="100px"){
  9. return 0; //如果找到宽度不为100的图片,则返回0,代表当前按钮可以点击
  10. }
  11. }
  12. return -1; //否则返回-1,告诉编辑器将当前按钮置灰
  13. }
  14. };