Jump to content

HtmlMemo Add Button To ToolBar - How


andyhill

Recommended Posts

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 ?

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...