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 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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events