Migrating Confluence DC to Cloud - HTML macro
Asked by Trudy Claspill:

This is a follow up question to this 2021 post:

<https://community.atlassian.com/t5/Confluence-questions/HTML-macro-Confluence-Server-to-iFrame-macro-Confluence-Cloud/qaq-p/1881224>

We are migrating Confluence DC to Confluence Cloud. On DC we have several instances of the HTML Macro. That macro is not available in Confluence Cloud.

Like the OP of the above post, we are trying to figure out what if anything we can do on the DC system to convert those HTML macros so that when the migration completes the result will be that the content is still displayed in Confluence Cloud.

The OP mentions that Cloud has an iFrame macro. Many of our HTML macros are used to imbed iFrame, but not all. Also, the iFrame macro itself is not available in DC, so we can't convert the macros on DC before the migration.

An answer on the post refers to [this document](https://confluence.atlassian.com/confkb/how-to-put-an-iframe-into-confluence-598837531.html) while seeming to imply that document details how to use the iFrame macro in DC. However, that document says to use the HTML macro to embed iframe code, so it is not a solution.

I'm thinking the only solution might be find a DC-compatible a third party app that supports HTML and also has a Cloud migration path, and convert the native Confluence DC HTML macros to those third party macros.

Anybody have any suggestions on this topic?


Answers:
author: Brant Schroeder
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) You are spot on that you would need to find an app that is available in both DC and cloud. The issue is I do not think there is one that exists. This is because DC has the HTML macro so no one is going to spend the time or money developing an app that provides this functionality in DC. Even if you found an app you would have to convert every page to the new macro. If you are spending the time to do that it might just be best to edit the page and add the macro content onto it. I know that the HTML macro is often used to reference information/forms/applications through an iFrame and that can not be recreated. You can just end up linking to this content, not ideal but workable. Often the macro is used to enhance a pages content by using HTML and that could be converted but would not look as good.

You can also take an inventory of the pages and after converting purchase an app and update all the pages with what they had in DC. The DC instance will still be there so you can go page by page and do the update. Really this is what you would have to do if you would have to convert to a new app in DC prior to migration.

Sorry that there is not a great answer or solution at this time.


author: Alex Medved _ConfiForms_
body: A developer perspective:

On Confluence cloud all the 3rd party connect macros are rendered within iframes - so all the HTML macros provided by vendors cannot offer the same functionality as an HTML macro on DC.

Simply because there is no "access" to the parent document (page) and you cannot manipulate it's DOM (HTML). Your code will be sandboxed to your iframe. That is why they mentioned iframes - as this is the only way to have something "custom", but is very limited and not something you usually do with an HTML macro on DC.

True that "some code" still can be injected into Confluence page directly, and this is done by implementing a so called static macro. But the output your app generates (for example an HTML with scripts and may be CSS) gets aggressively sanitized by Atlassian before embedding it into the page.

Alex


author: Trudy Claspill
body: Follow up -

We ended up installing [HTML for Confluence](https://marketplace.atlassian.com/apps/252/html-for-confluence?hosting=cloud&tab=overview) on the Confluence DC system just prior to migration, and converting the native macros to that, then migrating to Cloud.

1. Disable HTML modules in System App "Confluence HTML Macros"
2. Install replacement app [HTML for Confluence](https://marketplace.atlassian.com/apps/252/html-for-confluence?hosting=datacenter&tab=overview) from Appfire
3. Execute [app migration process](https://bobswift.atlassian.net/wiki/spaces/HTML/pages/1003586793/Migration+from+server+to+cloud)

comments: author: Rob Horan
body: Did this work for all HTML macros?


author: Trudy Claspill
body: It worked for all the native HTML macros that were in the specified instance.


author: Nar Kumar C. - Narva Software
body: Hi everyone,

The macros in the Cloud are always served inside Iframe, so HTML Macro in DC or Server is more flexible.

We have tried to document migration path for our app, [HTML Macro for Confluence](https://marketplace.atlassian.com/apps/1221472/html-macro-for-confluence?tab=overview&hosting=cloud) here:

[**Migrate Confluence HTML Macro from Server or DC to Cloud**](https://help.narvaapps.com/html-macro-for-confluence/migrate-confluence-html-macro-from-server-or-dc-to)

Feel free to reach out to our [support](https://bitwelt.atlassian.net/servicedesk/customer/portals) if you have further questions.

Regards,

Nar


author: Rob Horan
body: Would either of these apps work well?

* [https://marketplace.atlassian.com/apps/1212279/html-macro-for-confluence-cloud?tab=overview\&hosting=cloud](https://marketplace.atlassian.com/apps/1212279/html-macro-for-confluence-cloud?tab=overview&hosting=cloud)
* [https://marketplace.atlassian.com/apps/1221472/html-macro-for-confluence?tab=overview\&hosting=cloud](https://marketplace.atlassian.com/apps/1221472/html-macro-for-confluence?tab=overview&hosting=cloud)

comments: author: Alex Medved _ConfiForms_
body: Hi [@Rob Horan](/t5/user/viewprofilepage/user-id/853604)

It depends what you expect them to do - they all will work in an iframe and you will not be able to do the same things you can do on server (as from the iframe you cannot access main HTML document)

Alex


author: Rob Horan
body: Thank you - the migration path for pages with the HTML macro is not entirely clear, so all information helps!


author: Tracy Kaonje
body: Hi [@Rob Horan](/t5/user/viewprofilepage/user-id/853604)   

Did any of the apps work for you?


author: Nar Kumar C. - Narva Software
body: Hi Tracy,

We have migration guide for our app, [HTML Macro for Confluence](https://marketplace.atlassian.com/apps/1221472/html-macro-for-confluence?tab=overview&hosting=cloud) here:

[**Migrate Confluence HTML Macro from Server or DC to Cloud**](https://help.narvaapps.com/html-macro-for-confluence/migrate-confluence-html-macro-from-server-or-dc-to)

Feel free to reach out to our [support](https://bitwelt.atlassian.net/servicedesk/customer/portals) if you have further questions.


author: Rob Horan
body: [@Tracy Kaonje](/t5/user/viewprofilepage/user-id/4746763) this was not for my instance, and I don't have details on how this was resolved, but I'm sure this info helped.


Tags: cloud

confluence-cloud