From 3aac20a74efc5e6c4ced353c91a3123a24865c08 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 13 Jan 2023 12:17:01 +0800 Subject: [PATCH] Fix #7551 - ordered list --- Roo/bootstrap/form/HtmlEditorToolbarStandard.js | 2 ++ examples/bootstrap/Editor.js | 4 ++-- roojs-bootstrap-debug.js | 2 ++ roojs-bootstrap.js | 12 ++++++------ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Roo/bootstrap/form/HtmlEditorToolbarStandard.js b/Roo/bootstrap/form/HtmlEditorToolbarStandard.js index 002b0101e0..5d72017362 100644 --- a/Roo/bootstrap/form/HtmlEditorToolbarStandard.js +++ b/Roo/bootstrap/form/HtmlEditorToolbarStandard.js @@ -145,6 +145,8 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbarStandard, Roo.bootstrap.nav.Simpl } }), btn('list','insertunorderedlist',true); + btn('list-ol','insertorderedlist',true); + btn('pencil', false,true, function(btn){ Roo.log(this); this.toggleSourceEdit(btn.pressed); diff --git a/examples/bootstrap/Editor.js b/examples/bootstrap/Editor.js index 155184685e..d20ca39983 100644 --- a/examples/bootstrap/Editor.js +++ b/examples/bootstrap/Editor.js @@ -52,8 +52,8 @@ Roo.example.Editor = new Roo.XComponent({ stylesheets : (function(){ var css = []; - css.push('../css-bootstrap/bootstrap.css'); - css.push('../css-bootstrap/font-awesome.css'); + css.push('../../css-bootstrap/bootstrap.css'); + css.push('../../css-bootstrap/font-awesome.css'); //css.push(rootURL + '/Campaign/editor/editor.css'); return css; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 338ba77d5f..fe00f5c123 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -32905,6 +32905,8 @@ Roo.extend(Roo.bootstrap.form.HtmlEditorToolbarStandard, Roo.bootstrap.nav.Simpl } }), btn('list','insertunorderedlist',true); + btn('list-ol','insertorderedlist',true); + btn('pencil', false,true, function(btn){ Roo.log(this); this.toggleSourceEdit(btn.pressed); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index bef5f066e5..b6fe03da0f 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1411,12 +1411,12 @@ this.editor=A.editor;this.editorcore=A.editor.editorcore;this.buttons=new Roo.ut Roo.log(this.el);this.el.dom.style.marginBottom='0';var B=this;var C=this.editorcore;var D=this.editor;var E=[];var F=function(id,G,H,I,J){var K=H?'toggle':'click';var a={size:'sm',xtype:'Button',xns:Roo.bootstrap,fa:id,cmd:id||G,enableToggle:H!==false,html:J||'',pressed:H?false:null,listeners:{} };a.listeners[H?'toggle':'click']=function(){I?I.call(B,this):B.onBtnClick.call(B,G||id);};E.push(a);return a;};var style={xtype:'Button',size:'sm',xns:Roo.bootstrap,fa:'font',menu:{xtype:'Menu',xns:Roo.bootstrap,items:[]}};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',false,true);F('italic',false,true);F('align-left','justifyleft',true);F('align-center','justifycenter',true);F('align-right','justifyright',true);F('link',false,false,function(G){var H=prompt(this.createLinkText,this.defaultLinkValue); -if(H&&H!='http:/'+'/'){this.editorcore.relayCmd('createlink',H);}}),F('list','insertunorderedlist',true);F('pencil',false,true,function(G){Roo.log(this);this.toggleSourceEdit(G.pressed);});if(this.editor.btns.length>0){for(var i=0;i0){for(var i=0; +i{0}',this.placeholder||'');}else{this.markdownEl.dom.innerHTML=Roo.Markdown.toHtml(Roo.util.Format.htmlEncode(this.getValue())); -- 2.39.2