Defining a Macro Property panel allows you to add a hidden iframe to your macro's property panel. The iframe is loaded as soon as the property panel is opened.
In order to persist custom data using your property panel, use the Javascript Confluence API. For example:
AP.require(["confluence"], function (confluence) { var macroParams = { myParameter: value }; confluence.saveMacro(macroParams); });
In order to retrieve the custom data again when the property panel is opened, use confluence.getMacroData
(see
Confluence API):
AP.require("confluence", function (confluence) { var macroData = confluence.getMacroData(function(macroParams) { doSomethingWith(macroParams.myParameter); }); });
Dialogs may also be created. Use dialog.create
(see
Dialog API):
AP.require('dialog', function(dialog) { dialog.create({ key: 'my-module-key', width: '500px', height: '200px', chrome: true }).on("close", callbackFunc); });
url
Type | |
Format | uri-template |
Required | Yes |
Description | The URL of the add-on endpoint which will be served as a hidden iframe inside the property panel |
cacheable
Type | |
Defaults to | false |
Description | Returns whether the URL should be cacheable. Cacheable URLs are taken directly from the add-on descriptor, and lack all additional query parameters:
|
controls
Type | |
Description | List of controls which will be added to the macro property panel |
Rate this page: