From 50931ceebf763513e8ae7bd9ffd26ec9993967a2 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 16 Feb 2023 18:10:36 +0800 Subject: [PATCH] fix broken commit --- docs/src/Roo_HtmlEditorCore.js.html | 1 + ...o_bootstrap_form_HtmlEditorToolbar_Standard.js.html | 10 ++++++---- roojs-bootstrap-debug.js | 5 ++--- roojs-bootstrap.js | 2 +- roojs-debug.js | 2 +- roojs-ui-debug.js | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/src/Roo_HtmlEditorCore.js.html b/docs/src/Roo_HtmlEditorCore.js.html index cfce2cea93..76e9aaa0c7 100644 --- a/docs/src/Roo_HtmlEditorCore.js.html +++ b/docs/src/Roo_HtmlEditorCore.js.html @@ -907,6 +907,7 @@ break; case 'bold': case 'italic': + case 'underline': // if there is no selection, then we insert, and set the curson inside it.. this.execCmd('styleWithCSS', false); break; diff --git a/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html b/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html index 24907cd45b..7b28b6c9eb 100644 --- a/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html +++ b/docs/src/Roo_bootstrap_form_HtmlEditorToolbar_Standard.js.html @@ -137,9 +137,9 @@ }); children.push(style); - btn('bold', false,true); - btn('italic', false,true); - btn('underline', false,true); + btn('bold', 'bold',true); + btn('italic', 'italic',true); + btn('underline', 'underline',true); btn('align-left', 'justifyleft',true); btn('align-center', 'justifycenter',true); btn('align-right' , 'justifyright',true); @@ -331,7 +331,7 @@ var hasToggle = false; btns.each(function(e) { if (e.enableToggle && e.cmd) { - hasToggle = hasToggle || (['align-left', 'align-right', 'align-center', 'image' , 'link'].indexOf(e.btnid) < 0 && doc.queryCommandState(e.cmd)); + hasToggle = hasToggle || (['align-left', 'align-right', 'align-center', 'image' , 'link', 'underline'].indexOf(e.btnid) < 0 && doc.queryCommandState(e.cmd)); e.setActive(doc.queryCommandState(e.cmd)); } }, this); @@ -393,6 +393,8 @@ btns.get('link').setActive(tn == 'A' && this.selectedNode.hasAttribute('href')); btns.get('image').setActive(tn == 'IMG' || this.editorcore.enableBlocks && tn == 'FIGURE'); + btns.get('underline').setActive(tn == 'U' || sel.closest('u') ? true : false); + Roo.bootstrap.menu.Manager.hideAll(); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 4d87cb67fc..d1edf975a9 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -29330,7 +29330,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { } }, - + { xtype : 'Button', text: 'Hide Caption', @@ -33057,8 +33057,7 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbar.Standard, Roo.bootstrap.nav.Simp size : 'sm', xtype: 'Button', xns: Roo.bootstrap, - fa: 'eraser', - tooltip : "Clear Formating / Delete", + fa: 'trash', listeners : { click : this.onDelete.createDelegate(this) } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index b6792c0a6d..50acf69c99 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1420,7 +1420,7 @@ Roo.log(this.el);this.el.dom.style.marginBottom='0';var B=this;var C=this.editor };Roo.each(this.formats,function(f){style.menu.items.push({xtype:'MenuItem',xns:Roo.bootstrap,html:'<'+f+' style="margin:2px">'+f+'',tagname:f,listeners:{click:function(){C.insertTag(this.tagname);D.focus();}}});});E.push(style);F('bold','bold',true); F('italic','italic',true);F('underline','underline',true);F('align-left','justifyleft',true);F('align-center','justifycenter',true);F('align-right','justifyright',true);F('link',false,true,this.onLinkClick);F('image',false,true,this.onImageClick);F('list','insertunorderedlist',true); F('list-ol','insertorderedlist',true);F('pencil',false,true,function(G){Roo.log(this);this.toggleSourceEdit(G.pressed);});if(this.editor.btns.length>0){for(var i=0;i