After creating a macro (plugin) for confluence, I want to have the ability to edit it. When I click on edit page then edit on the macro, I get the error message:
"No Macro Metadata
There is no metadata configured for this macro which means no configuration screen can be presented here.
If this is a user macro then you can add metadata to the template using the User Macro Administration console."
How do I go about configuring metadata for my plugin?
Hello @Aviral Gupta
Welcome to the community.
What instructional documents did you use to guide you in creation of your macro/plugin? Can you provide a link to them?
I have not created a custom macro nor a plugin for Confluence Cloud before, but I found a few different reference documents when I was searching. It would be helpful to know which one you used.
I used the link above as a starting point and created my plugin, which is now working properly. Now I want to be able to "edit" the plugin, instead of creating a new one and having to put in all the configuration again every time.
So is the editing issue you are having about editing your plugin code, or editing the macro (supplied by the plugin) after you add that macro to a page?
You said you used the document as a starting point. Where did you deviate from the document, specifically in the section "Creating a Macro Element in Confluence"?
Editing the macro (supplied by the plugin) after I add that macro to a page. As for the document, my macro is much more complex than the basic document but the plugin itself is not the problem since the plugin works. I want the ability to edit its configuration after the macro is added to the page.
For a simple example to illustrate what I'm talking about, say the macro takes in a parameter called name and prints out "Hello [name]". I want to be able to edit the page, then click on edit macro, then change the name I supplied, etc. However, right now, when I click on edit macro, I get the error message I showed since I don't have metadata configured.
Thank you for that clarification.
You are able to create a new page, add the macro, and edit the configuration elements of the macro, correct?
The problem is only when you try to edit a page where the macro has already been inserted and configured, correct?
So far I am not finding explicit references point to exactly what the metadata is for a macro.
In your atlassian-plugin.xml file what elements do you have in your xhtml-macro section, compared to the example?
<xhtml-macro name="helloworld" class="com.atlassian.tutorial.macro.helloworld" key='helloworld-macro'>
I'm thinking maybe that section is the metadata for the macro.
This page about creating User Macros (in the UI) talks about metadata.