andyhill Posted June 19, 2020 Share Posted June 19, 2020 Please advise how to add (or insert) button on HtmlMemo ToolBar - Thanks. UniSession.AddJS('fMain.HTMLMemo.toolbar.insert(2, '+ '{ '+ 'xtype: "spacer"'+ '} );'); UniSession.AddJS('fMain.HTMLMemo.toolbar.insert(3, '+ '{ '+ 'xtype: "button", '+ 'text: '+QuotedStr('Today')+', '+ 'id: "syncTodayID", '+ 'listeners: {tap: function(el, v) {ajaxRequest(fMain.form, "_syncToday", [])}}'+ '} );'); Does nothing ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2020 Share Posted June 19, 2020 9 minutes ago, andyhill said: Please advise how to add (or insert) button on HtmlMemo ToolBar - Thanks. Hello, This post may help you: Quote Link to comment Share on other sites More sharing options...
andyhill Posted June 19, 2020 Author Share Posted June 19, 2020 Thank you for your reply. My code:- HtmlMemo.ClientEvents.ExtEvents.Clear; // s:= 'beforeInit=function beforeInit(sender, config) '+ '{ '+ ' config.listeners = '+ ' { '+ ' render: function(editor) '+ ' { '+ // ' editor.getToolbar().add( '+ // ' { '+ // ' xtype: ''separator'' '+ // ' }); , '+ ' editor.getToolbar().add( '+ ' { '+ ' xtype: ''button'', '+ ' text: ''Process'', '+ ' handler: function() '+ ' { '+ ' ajaxRequest(sender, ''process'', []) '+ ' } '+ ' }); '+ ' } '+ ' } '+ '} '; HtmlMemo.ClientEvents.ExtEvents.Add(s); Does nothing (ver 1531), also want separator before it and an icon on the button. Quote Link to comment Share on other sites More sharing options...
andyhill Posted June 19, 2020 Author Share Posted June 19, 2020 No such Event ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2020 Share Posted June 19, 2020 12 minutes ago, andyhill said: ExtEvents UniEvents Quote Link to comment Share on other sites More sharing options...
andyhill Posted June 19, 2020 Author Share Posted June 19, 2020 My humblest apologies - silly me. How do we add a separator before the button ? Quote Link to comment Share on other sites More sharing options...
andyhill Posted June 19, 2020 Author Share Posted June 19, 2020 ' iconCls: ''pictos pictos-action'', '+ ' hint: ''Process'', '+ Also Hint ? Quote Link to comment Share on other sites More sharing options...
andyhill Posted June 19, 2020 Author Share Posted June 19, 2020 tooltip now OK Please show how to add separator before the button Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2020 Share Posted June 19, 2020 5 minutes ago, andyhill said: Please show how to add separator before the button { xtype: 'tbseparator' } Quote Link to comment Share on other sites More sharing options...
andyhill Posted June 19, 2020 Author Share Posted June 19, 2020 Thank you kindly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.