You do this in two parts:
-
Embed the HTML in a Browser element – add a Browser element from the editor (requires MCEF) and point it at your HTML file in
config/fancymenu/assets. Use afile:///URL likefile:///config/fancymenu/assets/my_browser_page.html(on Linux you must resolve the absolute path via the{“placeholder”:”absolute_path”,…}helper, see the Resources doc). That page will render inside your menu. -
Make the HTML buttons trigger FancyMenu actions – inside your HTML you can use the injected JavaScript bridge described on the Browser JavaScript API page. For example:
<button onclick="fancymenu.actions.execute('opengui','my_tab_screen')">Open tab</button>Replace
my_tab_screenwith the screen identifier or custom GUI you want to show. If you need callbacks, usefancymenu.actions.executeWithCallback. Add as many buttons as you like and point them at the screens/tabs you built with custom GUIs or layouts.
That way your embedded web UI can open other FancyMenu tabs/screens through the same action strings you’d use in the layout editor.