Forums

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

HTML Macro with css and JS not working.

Daniel June 21, 2021

Hi,

we're running confluence 7.11.1 with activated HTML Makro.
When i insert a <div> Tag combined with some CSS (<style>) and JS effects (<script>) to change the display type, everything looks perfect in the preview. But when i hit save, all CSS and JS elements are gone. Back to the edit mode, the code is still there and the preview looks as intented...

I also tried to implement it as an user macro. Preview looks fine, saved page is without CSS/JS.

Does anyone know this problem and has a workaround or solution?

1 answer

1 accepted

0 votes
Answer accepted
Daniel June 21, 2021

problem found... i've removed the <html> and <head> tags and now it's working...

Andre
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!
September 30, 2021

The <html> tag is not the problem. The <head> and/or <body> tags are the problem. I can use the <html> tag and javascript is still working.

Like Krishna Cheedella likes this
Krishna Cheedella
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!
November 10, 2025

Removing the <html> tags didn't work. Removing ONLY the <body></body> tags did the trick. Thanks Andre.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events