We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about whatā€™s changed.

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