Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

HTML Macro Template Style Disappears

Hello everyone,

I am working on a Confluence (Version 7.4.6) blueprint and build it with a html macro. The html macro includes some short css changes regarding the table on the page.

Screenshot 2021-03-23 154658.jpg

So far it goes perfectly fine. The macro works and the page looks as it is suppose to be.

However when creating a page with this template, the html macro is interpreted and rebuild on the new page. And here it is how it looks on the new page.

Screenshot 2021-03-23 155047.jpg

You may noticed already, that the style (<style> and </style>) clause is missing. Therefore the text is displayed in the page and the css is not working anymore. I already tried to play around in the source editor and CDATA clauses, but I may did not do it right.

 

Is there a way to let the interpreter know, that the macro should just be copied from the template to the new created page, instead of somehow deleting the style clauses?

1 answer

1 vote
Bill Bailey Community Leader Mar 23, 2021

I would come at this problem from another angle. Create a user macro that basically surrounds the body content (your table)  with a classed div tag. You can then either include it in your space CSS or add it to your user macro. That is far more durable a solution PLUS you can update your CSS at any time, and have it apply to ALL instances.

Hello  @Bill Bailey ,

thank you for your response. I should have mentioned this earlier, I'm not a system administrator. So I have restricted admin rights. I dont have access to the user macros.

So I am just trying to have the css copied from the template to the new page. If you have another smart idea, please let me know.

Bill Bailey Community Leader Mar 24, 2021

Can you gain Space Admin rights? That would allow you to update the space CSS which would give you another angle.

Hello @Bill Bailey ,

sadly I cant. I could find a really wierd solution, by creating a second blueprint with a live template of the main blueprint. In this case the style brackets do not disappear. However many functions are useless now.

For example the task report, which does not work with a live template page.

So in the case you have any other ideas on how to make the html macro work correctly with the blueprint, please let me know. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Introducing Confluence Cloud for Microsoft Teams (Available for Preview!)

Hi Atlassian Community, Remote work has shifted how teams collaborate, and we’ve heard from many of you that Microsoft Teams has become mission critical to many of your workflows, from how you chat...

2,589 views 21 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you