ACE Static Macro opening a dialog

Hi community and Atlassian staff,

Is there a way to open a dialog (defined in the atlassian-connect.json file) from the Static Content Macro?

Dialogs are created using JS API (via AP.dialog). But there is no way of running JS code inside static macro. So this is not an option.

I figured out a static URL that causes Confluence to open a dialog, but this is definitely dirty (dev console shows tons of errors + there is no way to add any context parameters to a dialog opened this way).

Ideas?