I am coding a Confluence macro for which I have overriden the default macro editor dialog to get my own. I have a single string parameter in which I would like to store a JSON structure so I can easily parse it when the macro is edited again.
When doing so, after saving the macro, the macro element on the page editor does not behave properly. It should display the name of the Macro along with the parameters if I wish to display them. Instead the name is replaced with the first element of my JSON object and the parameter part is the rest of the JSON object (see attached image). Is there any trick besides changing my storage format and parsing by hand ?
When I edit the macro again, I do receive the data correctly. It is only a display problem in the Page Editor.
Here is my macro definition
<xhtml-macro name="canalmetadata" label="Canal Metadata"
class="com.confluence.plugins.metadata.macros.CanalMetadataMacro"
key="canal-metadata.macro">
<description key="canal-metadata-macro.description">The metadata selection macro</description>
<category name="confluence-content"/>
<parameters>
<parameter name="metaselection" type="string" required="true">
<option key="showNameInPlaceholder" value="false"/>
<option key="showValueInPlaceholder" value="false"/>
</parameter>
</parameters>
</xhtml-macro>
Steps to reproduce:
- Add Column macro to a page
- Set Column width parameter to "{test"
Expected behaviour: Macro element in the page editor should have title "Column | width = {test".
Actual behaviour: Macro element in the page editor has title "test".
Thank you for your interest in this ticket. The Confluence Server and Data Center team released a major upgrade to the editor in 6.14. Due to the age of this ticket and/or lack of updates, we suspect that this issue is no longer relevant or was resolved as a result of the upgrade and are now closing this ticket.
If this issue is still a problem in your Confluence instance in version 6.15 or later, please tag me in your comment and we can reopen this ticket for review.
You can read more about the editor upgrade in the 6.14 Release Notes.
Thanks
Makisa Appleton | Senior Product Manager, Confluence Server and Data Center