Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-12492

Provide a macroId to uniquely identify multiple instances of a macro on a page

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion.

      It's often useful to be able to distinguish multiple invocations of a macro on the same page, for instance in JavaScript used by the Macro. So a lot of macros implement some kind of macroId variable that's substituted into the HTML/JavaScript it outputs.

      This is easy enough to implement, but it is duplicated across several plugins, with a variety of different implementations, and you'd be surprised how often people have trouble with it or just get it wrong (e.g., see CONF-12125, which is caused by a user macro that tries to use a random number as the macro id!)

      If the framework passed a macroId to each macro and user macro, it would be a small but useful improvement to the plugin development experience.

              barconati BillA
              tmoore Tim Moore [Atlassian]
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: