Confluence customized macros on one page can't be identified by "Edit" button?

AustinS January 9, 2018

I'm developing a customized 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 macro of one Confluence page. That means for these macros on same page, "Edit" feature don't know / can't identify which macro should be edited.  

For instance, I have multiple customized macros as below w/ different parameters for each one. If I'm trying to "Edit" one of them, I can't fetch parameters "project" = "FHC", just empty.

Screen Shot 2018-01-09 at 9.28.38 AM.png

Is there a workaround can be used to edit customized 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 customized macro? How do I do it?  

I know in non customized macro, which has preview, "Edit" button can identify which one is which one on a page, and can retrieve macro properties correctly.  I used "

AJS.MacroBrowser.setMacroJsOverride

" 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.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events