roojs-bootstrap.js
authorAlan <alan@roojs.com>
Thu, 16 Feb 2023 07:43:47 +0000 (15:43 +0800)
committerAlan <alan@roojs.com>
Thu, 16 Feb 2023 07:43:47 +0000 (15:43 +0800)
roojs-bootstrap-debug.js

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

index 6e4d428..de3b5b8 100644 (file)
@@ -33634,7 +33634,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Context, Roo.bootstrap.nav.Simpl
                 }
                 this.selectedNode = db;
                 left_label = block.friendly_name;
-                ans = this.editorcore.getAllAncestors();
+                 
             }
               
             
index a9207ce..feb861d 100644 (file)
@@ -1441,11 +1441,10 @@ if(C){C.removeNode();B.removeAllRanges();B.addRange(A);this.updateToolbar(null,n
 }Array.from(this.editorcore.doc.body.querySelectorAll('.roo-ed-selection')).forEach(function(e){e.classList.remove('roo-ed-selection');});var C=this.editorcore.getAllAncestors();if(!B){B=C.length?(C[0]?C[0]:C[1]):this.editorcore.doc.body;B=B?B:this.editorcore.doc.body;
 B=B.tagName.length?B:this.editorcore.doc.body;}var tn=B.tagName.toUpperCase();var D=this.selectedNode;this.selectedNode=B;var E=tn;var db=false;if(B&&B.hasAttribute('data-block')){db=B;}else if(B&&B.closest('[data-block]')){db=B.closest('[data-block]');}var F=false;
 if(db&&this.editorcore.enableBlocks){F=Roo.htmleditor.Block.factory(db);if(F){db.className=(db.classList.length>0?db.className+' ':'')+'roo-ed-selection';tn='BLOCK.'+db.getAttribute('data-block');if(typeof(this.button_groups[tn])=='undefined'){this.button_groups[tn]=this.buildBlockToolbar(F);
-}this.selectedNode=db;E=F.friendly_name;C=this.editorcore.getAllAncestors();}}if(this.active_group!==false&&this.active_group.name==tn&&D==this.selectedNode&&ev!==false){return;}if(tn=='BODY'){this.deleteBtn.hide();this.hide();this.hideActiveGroup();return;
-}if(this.active_group){this.hideActiveGroup();}this.showActiveGroup(tn);this.show();this.deleteBtn.show();},hideActiveGroup:function(){this.hide();if(this.active_group===false){return;}this.active_group.forEach(function(e){e.hide();});this.active_group=false;
-},showActiveGroup:function(tn){if(typeof(this.button_groups[tn])=='undefined'){return;}this.active_group=this.button_groups[tn];this.active_group.forEach(function(e){e.show();});if(this.selectedNode.hasAttribute('data-block')){var A=Roo.htmleditor.Block.factory(this.selectedNode);
-this.active_group.forEach(function(e){e.setValue(this.selectedNode.getAttribute(A[e.name]));},this);return;}this.active_group.forEach(function(e){if(typeof(e.attrname)=='undefined'){return;}e.setValue(this.selectedNode.getAttribute(e.attrname));},this);}}
-);
+}this.selectedNode=db;E=F.friendly_name;}}if(this.active_group!==false&&this.active_group.name==tn&&D==this.selectedNode&&ev!==false){return;}if(tn=='BODY'){this.deleteBtn.hide();this.hide();this.hideActiveGroup();return;}if(this.active_group){this.hideActiveGroup();
+}this.showActiveGroup(tn);this.show();this.deleteBtn.show();},hideActiveGroup:function(){this.hide();if(this.active_group===false){return;}this.active_group.forEach(function(e){e.hide();});this.active_group=false;},showActiveGroup:function(tn){if(typeof(this.button_groups[tn])=='undefined'){return;
+}this.active_group=this.button_groups[tn];this.active_group.forEach(function(e){e.show();});if(this.selectedNode.hasAttribute('data-block')){var A=Roo.htmleditor.Block.factory(this.selectedNode);this.active_group.forEach(function(e){e.setValue(this.selectedNode.getAttribute(A[e.name]));
+},this);return;}this.active_group.forEach(function(e){if(typeof(e.attrname)=='undefined'){return;}e.setValue(this.selectedNode.getAttribute(e.attrname));},this);}});
 // Roo/bootstrap/form/Markdown.js
 Roo.bootstrap.form.Markdown=function(A){Roo.bootstrap.form.Markdown.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.form.Markdown,Roo.bootstrap.form.TextArea,{editing:false,initEvents:function(){Roo.bootstrap.form.TextArea.prototype.initEvents.call(this);
 this.markdownEl=this.el.createChild({cls:'roo-markdown-area'});this.inputEl().addClass('d-none');if(this.getValue()==''){this.markdownEl.dom.innerHTML=String.format('<span class="roo-placeholder">{0}</span>',this.placeholder||'');}else{this.markdownEl.dom.innerHTML=Roo.Markdown.toHtml(Roo.util.Format.htmlEncode(this.getValue()));