How to allow Confluence Mobile to render a macro

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article is about Confluence mobile web (4.3.2 or later). It does not apply to the Confluence iOS app, which is available now for Confluence Cloud customers.

This article is for Confluence administrators seeking to customise the white-list of macros that will display in the mobile interface. If you are a developer looking to make your macro "mobile-compatible", then please consult our relevant developer tutorial - Making your macro render in Confluence mobile

The Confluence Mobile plugin will, by default, only render macros that are explicitly customised by their developer to be mobile compatible. However, there could be cases where your site uses macros that are no longer under development and you cannot access the source to make them mobile compatible. This article describes a worst case fallback that will allow you to enable these macros in mobile by modifying the internal white list of macros.

Solution

Non-mobile Macro Whitelist

To modify this whitelist you would need to uncompress the atlassian-bundled-plugins.zip from your installation.

On 4.3.2 this is found in -

<web-app>/WEB-INF/classes/com/atlassian/confluence/setup

On 5.0 this is already uncompressed at -

<web-app>/WEB-INF/atlassian-bundled-plugins

Uncompress the contained confluence-mobile-<version>.jar file, edit pluginContext.xml and add your macro to the list that by default starts like -

pluginContext.xml snippet

1 2 3 4 5 6 7 8 <!-- Non-mobile specific macros which we will still allow to execute --> <beans:set> <beans:value>aim</beans:value> <beans:value>anchor</beans:value> <beans:value>change-history</beans:value> <beans:value>chart</beans:value> etc.. <beans:value>macro you want to whitelist</beans:value>

You should then bundle the contents of confluence-mobile-<version>.jar back to a complete and single JAR file and install it via the Universal Plugin Manager.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.