roojs-bootstrap.js
authorleon <leon@roojs.com>
Wed, 29 Mar 2023 04:14:16 +0000 (12:14 +0800)
committerleon <leon@roojs.com>
Wed, 29 Mar 2023 04:14:16 +0000 (12:14 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 8c3e063..a3d1d7f 100644 (file)
@@ -33242,7 +33242,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp
                 }
                 this.editorcore.focus();
             },
-            cls : 'pub-email'
+            cls : 'pub-error'
         });
     },
     /**
index 258ad11..dd71c5d 100644 (file)
@@ -1428,7 +1428,7 @@ var D=new FileReader();D.addEventListener('load',(function(){if(bl){var E=bl.ima
 if(this.editorcore.enableBlocks){var F=new Roo.htmleditor.BlockFigure({image_src:D.result,caption:'',caption_display:'none'});C.insertAtCursor(F.toHTML());this.addFiles(A,true);return;}if(sn&&sn.tagName.toUpperCase()=='IMG'){var E=sn.src;sn.src=D.result;this.editor.syncValue();
 C.owner.fireEvent('editorevent',C.owner,false);C.owner.fireEvent('imageupdate',C.owner,sn,E);return;}C.insertAtCursor('<img src="'+D.result+'">');this.addFiles(A,true);}).createDelegate(this));D.readAsDataURL(f);},onBtnClick:function(id){this.editorcore.relayCmd(id);
 this.editorcore.focus();},onLinkClick:function(A){var B=this.selectedNode&&this.selectedNode.tagName.toUpperCase()=='A'?this.selectedNode.getAttribute('href'):'';Roo.bootstrap.MessageBox.show({title:"Add / Edit Link URL",msg:"Enter the URL for the link",buttons:Roo.bootstrap.MessageBox.OKCANCEL,minWidth:250,scope:this,prompt:true,multiline:false,modal:true,value:B,fn:function(C,D){if(C!='ok'){this.editorcore.focus();
-return;}if(B!=''){this.selectedNode.setAttribute('href',D);return;}if(D&&D.match(/http(s):\/\/.+/)){this.editorcore.relayCmd('createlink',D);}this.editorcore.focus();},cls:'pub-email'});},updateToolbar:function(A,ev,B){if(!this.editorcore.activated){this.editor.onFirstFocus();
+return;}if(B!=''){this.selectedNode.setAttribute('href',D);return;}if(D&&D.match(/http(s):\/\/.+/)){this.editorcore.relayCmd('createlink',D);}this.editorcore.focus();},cls:'pub-error'});},updateToolbar:function(A,ev,B){if(!this.editorcore.activated){this.editor.onFirstFocus();
 return;}var C=this.buttons;var D=this.editorcore.doc;var E=false;C.each(function(e){if(e.enableToggle&&e.cmd){E=E||(['align-left','align-right','align-center','image','link','underline'].indexOf(e.btnid)<0&&D.queryCommandState(e.cmd));e.setActive(D.queryCommandState(e.cmd));
 }},this);if(ev&&(ev.type=='mouseup'||ev.type=='click')&&ev.target&&ev.target.tagName!='BODY'){B=ev.target;}var F=this.editorcore.getAllAncestors();if(!B){B=F.length?(F[0]?F[0]:F[1]):this.editorcore.doc.body;B=B?B:this.editorcore.doc.body;B=B.tagName.length?B:this.editorcore.doc.body;
 }var G=this.selectedNode;this.selectedNode=B;var db=false;if(B&&B.hasAttribute('data-block')){db=B;}else if(B&&B.closest('[data-block]')){db=B.closest('[data-block]');}Array.from(this.editorcore.doc.body.querySelectorAll('.roo-ed-selection')).forEach(function(e){e.classList.remove('roo-ed-selection');