Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Macro can's work properly

guanghao fan April 15, 2025

I try to add a html macro in confluence cloud. but failed.

Here's the code and it runs properly if saved it as html file.


<!DOCTYPE html>
<html lang="en">

<body>

<!-- WebDataRocks scripts -->
<link href="https://cdn.webdatarocks.com/latest/webdatarocks.min.css" rel="stylesheet"/>
<script src="https://cdn.webdatarocks.com/latest/webdatarocks.toolbar.min.js"></script>
<script src="https://cdn.webdatarocks.com/latest/webdatarocks.js"></script>
<div id="wdr-component"></div>


<script>
var pivot = new WebDataRocks({
container: "#wdr-component",
height: 530,
toolbar: true,
report: {
dataSource: {
"dataSourceType": "csv",
"filename": "https://cdn.webdatarocks.com/data/data.csv"
},
"slice": {
"rows": [{
"uniqueName": "Country",
"filter": {
"members": [
"Country.United Kingdom",
"Country.United States"
],
"negation": true
}
},
{
"uniqueName": "Destination"
}
],
"columns": [{
"uniqueName": "Category"
},
{
"uniqueName": "Measures"
}
],
"measures": [{
"uniqueName": "Price",
"aggregation": "sum",
"format": "currency"
},
{
"uniqueName": "Discount",
"aggregation": "sum",
"format": "currency"
}
],
"expands": {
"rows": [{
"tuple": [
"Country.Australia"
]
}]
}
},
"conditions": [{
"formula": "#value > 350000",
"format": {
"backgroundColor": "#0598df",
"color": "#FFFFFF"
}
},
{
"formula": "AND(#value > 1000, #value < 3000)",
"format": {
"backgroundColor": "#f45328",
"color": "#FFFFFF"
}
}
],
options: {
grid: {
type: "classic"
}
}
}
});
</script>

 

</body>
</html>

 

1 answer

0 votes
Barbara Szczesniak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2025

@guanghao fan Welcome to the Atlassian community.

Out of the box, there is no HTML macro in Confluence Cloud (there is in Server and Data Center, but not Cloud).

Are you using a 3rd-party app that provides this macro to add it on a page? If so, which app are you using? You may want to refer to the app developer's documentation for instructions and troubleshooting information.

guanghao fan April 15, 2025

Hi @Barbara Szczesniak 

We are migrating from Confluence Server to Confluence Cloud. I use the html macro, and it can work very well.

However, it can't work when we move to the Confluence Cloud, the app what I am using is the HTML Renderer. Looks like it only has very limited feature just for safety, right?

Barbara Szczesniak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2025

@guanghao fan I'm not sure what method you are using to migrate to Cloud, but this page offers a lot of information: https://support.atlassian.com/migration/resources/ 

There are links to a lot of pages that may hold the information you need. I'm not sure if there's anything there about what to do with all your Server macros that aren't supported on Cloud.

Another page you might want to look at is https://support.atlassian.com/migration/docs/differences-using-confluence-data-center-and-cloud/ 

I haven't done a migration or used Server, so I can't give more detailed information. Maybe someone else in the community with this experience will chime in.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events