Forums

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

HTML Macro can's work properly

guanghao fan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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?

Suggest an answer

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

Atlassian Community Events