Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Macro javascript does not work on confluence app.

Deepak Singh Butola November 27, 2019

As per the confluence developer guide, we have followed the given steps on below URL to run custom macros on mobile devices :

ConfluenceMobile.contentEventAggregator.on("displayed", function() {});
URL: https://developer.atlassian.com/server/confluence/making-your-macro-render-in-confluence-mobile/

Custom macro javascript works fine using mobile chrome browser but doesn't seem to be working on the confluence server mobile app due to javascript code not getting executed.

Is there a way to execute the javascript files on the app using macros?

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2019

Hello there, @Deepak Singh Butola . Your question is a good one, let us have a look.

You stated that even after following the Developer guide, your macro is not displaying as expected.

Looking at our Confluence Server Mobile Application documents, we can see this:

Limitations and known issues

  •     Some page macros won't display in the app or mobile web. You'll need to view the page in your browser (or switch to full desktop mode on your device).
  •     Image and file upload is not currently available in the app.
  •     Links to Confluence pages (from emails or other apps) don't automatically open in the app.
  •     Admins can disable push notifications for your entire site.

Here is the link to the document from which I took the excerpt:

 

Our mobile and desktop interfaces are pretty different from one another. As you have noticed, we do recommend loading a different set of resources for the Mobile View. Here we can check this information:

Could you clarify if you checked this part of this documentation? There is a description on how to approach macros that contain JavaScript and Confluence Server Mobile Application.

 

Also, you can have a look at this improvement suggestion were we try to improve the description of what is not supported within the Confluence Server Application:

 

For more in-depth explanation and help with developing a question, you can reach our Sister community, the Atlassian Developer Community! Here, take a look:

 

I hope this shines some light into your development path, Deepak! Looking forward to your reply.

Deepak Singh Butola December 2, 2019

Hey @Diego ,

Thanks, We have tried all the above-mentioned steps but none of them seems to be working. Only one approach i.e HTML macro will work but we don't want the user to edit and insert code into macros.
Could you please provide us some precise solution which can work on an app.

Regards,
Deepak

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events