Forums

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

wrapper for html-include macro

Mahima Mishra November 18, 2020

I have a html page that has thumbnail.hover enabled but when I include that html to confluence, that property is lost and some other styling related to the table rows.

Is it possible to create a user defined macro as a wrapper around the include html macro to include the css of my choice?

or any other way to keep the formatting as it is in the source html file.

1 answer

0 votes
Bill Bailey
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.
November 18, 2020

Yes you could do that. But let's back up to what exactly the end goal is. For example, are you only wanting to do this for one table, or multiple?

Mahima Mishra November 18, 2020

I basically want to include a html page and apply the stylesheet to all the tables that page contains. 

Bill Bailey
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.
November 18, 2020

Then yes, a user macro that basically sets all of your conditions/parameters is the solution. You can have the macro either call a stylesheet or included the code in the macro. If there is overlap in the definitions, you may need to set a class on the iframe.

Mahima Mishra November 18, 2020

Do you have an example to share... My html and macro writing skills are very limited.

Bill Bailey
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.
November 20, 2020

I wrote an article on how do to do this: Getting Started with User Macros - Writing a Wrapper Macro 

Take a look to see if this would be doable, and we can go from here. ;-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events