How to allow Confluence Mobile to render a macro

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

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.

ソリューション

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

最終更新日: 2016 年 1 月 5 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.