Modules
Display conditions

Rate this page:

Macro

The macro module inserts dynamic content into the user interface via an editor. Editor macros are only compatible with the Atlassian editor. All cloud sites use the Atlassian editor by default.

The macro module works in Confluence, where the macro is inserted by typing "/" and selecting from the quick insert menu of the editor. The macro module is implemented by a Forge function. See the Macro component documentation for an example.

Properties

PropertyTypeRequiredDescription
key

string

Yes

A key for the module, which other modules can refer to. Must be unique within the manifest.

Regex: ^[a-zA-Z0-9_-]+$

functionstringThe macro module requires either a function for usage with the UI kit, or a resource when building with custom UI.A reference to the function module that defines the macro.
resourcestringA reference to the static resources entry that your macro wants to display. See resources for more details.
resolver{ function: string }Contains a function property, which references the function module that defines the configuration of resource. Can only be set if the module is using the resource property.
viewportSize'small', 'medium', 'large' or 'xlarge'The display size of resource. Can only be set if the module is using the resource property. Remove this property to enable automatic resizing of the module.
titlestringYesThe title of the macro. In Confluence, this is displayed in the editor.
descriptionstringThe description of the macro. In Confluence, this is displayed in the editor.
config{ function: string }Contains a function property, which references the function module that defines the macro configuration.

Rate this page: