Here is a customized macro image placeholder:
<p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2NvbnRlbnRieWxhYmVsOmNxbD1sYWJlbCA9ICJkYWdkYS1ib2FyZCJ9&locale=en_GB&version=2" data-macro-name="contentbylabel" data-macro-parameters="ppr=rcs "dagda-board"" data-macro-schema-version="3"><br></p>
The "definition=" part of "src" seems generated automatically. And for each macro should has its unique "definition" value. Just curious that how it created by what kind of rules? Any document mentioned these knowledge?
And any possible reason that may cause macro image placeholder
Thanks in advance.
I assume you are able to access to Confluence source code. The above image is generated via this servlet com.atlassian.confluence.tinymceplugin.placeholder.MacroPlaceholderServlet
You can check it out the logic and the rule from inside the doGet method of this class
That is true as you guessed. The "definition" part of the url contains the macro definition information
That you can refer to the class com.atlassian.confluence.xhtml.api.MacroDefinition
And the logic to render that url is placed in this class com.atlassian.confluence.content.render.xhtml.editor.macro.CustomImageEditorMacroMarshaller, see marshal method for further information
I hope this helps
Thanks for these helpful information, Minh.
One more question related to this, I'm developing a user macro that will be used multiple time on one page, and I found "Edit" button which under <div class="panel-buttons" > and belongs to <a href="#" class="aui-button macro-placeholder-property-panel-edit-button first"> element, is SHARED by any user macro of one Confluence page. That means for these user macros on same page, "Edit" feature don't know / can't identify which macro should be edited.
Is there a workaround can be used to edit user macros on the same page and can get properties (parameters) of each macro correctly when re-open or re-edit it? Or any API can I use in user macro? How do I do it?
I know in non user macro, which has preview, "Edit" button can identify which one is which one on a page, and can retrieve macro properties correctly. I used "
" to override the "opener" to open my own custom "MacroBrowser". But I'm not sure why "Edit" button doesn't work to retrieve the macro's parameters when we re-open and edit it.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...
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