I transfered a former user macro to a plugin macro, because I needed additional functionality, which are not possible within just a user macro. As a user macro, I had the option to limit the visibility of the macro to system administrators only in the Macro Browser. How do I achieve this with a plugin macro?
Within the macro definition in my atlassian-plugin.xml, I already tried the following:
Well, I still don't know how to make a plugin macro only visible to administrators in the macro browser, but I figured out, how to use the attribute hidden="true" in way that works for me.
The setting hidden="true" hides the macro from everyone in the macro browser, the rendering problem, which occured, was due to the fact, that I implemented my plugin only in the xhtml-way:
<xhtml-macro key="mycolour-xhtml" name="mycolour" class="com.atlassian.confluence.plugin.xhtml.MyColourMacro" hidden="true"> <category name="development"/> <parameters/> </xhtml-macro>
after adding also the old style macro definitions to my atlassian-plugin.xml:
<macro key="mycolour" name="mycolour" class="com.atlassian.confluence.plugin.xhtml.MyColourMacro" hidden="true"> <category name="development"/> <parameters/> </macro>
my macro renders now fine using wiki-markup.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs