Is possible set fullscreen modal or normal via javscript coding?
Hello,
Thank you for writing to us.
To open fullscreen programmatically, we suggest using the following method:
flexmonster.toolbar.fullscreenHandler();
Please let us know if this works.
Best Regards,
Maksym
No, unfortunately!
Hello,
Thank you for the reply and the details you provided.
In the screenshot, we noticed that the toolbar is disabled. This causes an error since, with a disabled toolbar, Flexmonster does not create an flexmonster.toolbar
instance. As a result, all methods from the toolbar are unavailable. If you want to disable a toolbar and still access its methods, we recommend hiding it visually with CSS but enabling it by setting the toolbar: true
option within new Flexmonster()
constructor:
#fm-toolbar-wrapper {
height: 0 !important;
}
Here is a code sample that utilizes this approach to add an external fullscreen button: https://jsfiddle.net/flexmonster/0nzhb5rg/
Additionally, note that the toolbar is not immediately initialized upon loading the page. Based on the particular use case shown in your code, you can add flexmonster.toolbar.fullscreenHandler()
to a click handler without significant precautions. However, if you want to open the fullscreen upon loading automatically, this should be done in Flexmonster's ready
event handler, as this event signals that the component's initial configuration is completed.
Please let us know if our answer helped you.
Best Regards,
Maksym
OK,It's run! TNX
Hello,
Thank you for your feedback.
We are glad to hear that our solution worked.
Feel free to contact us if more questions arise.
Best Regards,
Maksym