It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Macro javascript does not work on confluence app. Edited

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

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.

Hey @Diego_Canto_Rodrigues ,

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
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

109 views 3 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you