Currently, there is no clear JavaScript event that is fired when the macro modal is opened or when the parameters are loaded. Adding a well-documented event would be nice
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.