Web Resource Modules for Confluence Cloud?

Can we create web resource modules in Cloud?

@criley if you are trying to do so in order to inject Javascript/CSS and manipulate the Cloud host instance, the answer is most definitely no. The Atlassian Cloud products only support add-ons that run in an iframe and a limited set of strictly defined integration points. The only workaround for trying to hijack the host product is through browser extensions (see https://marketplace.atlassian.com/apps/1216948/bandage-for-jira?hosting=cloud&tab=overview)

I actually want to create an Atlassian Connect module that will do what the pay-for resources on the Atlassian Marketplace do, like:

HTML Macro for Confluence Cloud
Macro Toolbox (HTML, Tabs, Expand)

Code Snippet - Run HTML, CSS and JS

There obviously is a way to make something like this since they do not work for Atlassian and have managed to do so. What I have a feeling is the problem here, however, is that web resource modules are not a replacement for Atlassian Connect apps and that a Connect app is indeed what I would have to make.

Those are all connect apps (macros specifically).

Oh!! How does a Connect macro differ from another Connect app? Is it made differently? I really want to try to make one and see how far I can get with it! I figure what better way to get to know this product than by making something to interact with it! :smiley:

Connect macro’s are an interesting part of the connect framework: they either respond in a very specific way which enabled Confluence Cloud to parse them (like with the static macro) or they are basically connect apps that are injected within an iframe in the confluence page (see dynamic macro).

For instance, the HTML Macro for Confluence cloud runs the HTML / Javascript / CSS that users upload to the connect app from within the iframe. When you edit the macro content, you are doing so on using the app hosted by the app developer. The HTML / CSS / Javascript is stored by the app developer on their server. Confluence only provides a wrapper around the app developer code to ensure a consistent user experience.

The basic thing for you to understand when creating connect apps (either for confluence or lira) is that you are responsible for hosting your app, storing the app data and providing the interface for editing and displaying the data within the context of the host application.

To make sure you create a consistent user experience, It is highly recommended that you look at AtlasKit, the React component set provided by Atlassian that will allow your app to have the same look and feel as the host product.

The only thing the Atlassian Cloud host product dus is create the appropriate navigation that allows users to access your app. For all the other aspects, you’re on your own.

Another important thing about dynamic macros is that they only work in a desktop browser - they do not display in the Confluence mobile app at all, which is somewhat limiting.

More info:
https://jira.atlassian.com/browse/CONFCLOUD-57654

My concern about something that sits in an iframe is that it cannot affect the rest of the page, only display it. Therefore, I will not be able to create page functionality this way. I would like to develop a tool that allows me to actively insert script into a page that can affect the page, not just the contents of its iframe—natively. I would like the add-on to work exactly like the script, style, div, and span macros (that are being removed, UGH) currently work. How can I accomplish this?