How can I attach a handler to a custom button?

Resolved
hyeji Yoo asked on August 8, 2023

hello !
I am currently developing a custom button applied to flexmonster as shown in the attached picture.
However, if display of '#fm-toolbar-wrapper' is set to none in css, formatCellsHandler(), conditionalFormattingHandler() and optionsHandler() do not work.
I will attach a jsfiddle link so please let me know the solution 😥
https://jsfiddle.net/yooheag/L8o5tb14/27/
 
thank you 🙂

Attachments:
Screenshot_1.jpg

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 8, 2023

Hello,

Thank you for reaching out to us.

Kindly note that Toolbar methods are stored in a separate file (flexmonster.toolbar.js), which is not used if the Toolbar is hidden(display: none;).
However, you can hide the Toolbar visually by setting its height as zero while enabling it in the Flexmonster constructor:

#fm-toolbar-wrapper {
  height: 0 !important;
}

You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/Lw6zceht/ 

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Public
hyeji Yoo August 8, 2023

Wow! It works ! Thank you.

Have a nice day. 😊

 

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 8, 2023

Hello,

Thank you for the feedback! We are glad to hear that it works for you. 

I hope you have a nice day too! 

As always, don't hesitate to contact us in case further questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer