I have been heavily using the div and span macro for all kinds of self-created CSS styles for my PDF exports (page breaks, background colours, running headlines, pages in landscape mode, ...).
As I am still working on a very old Confluence version (4.3.7), this hasn't been a problem so far. But, as I have learned, in newer version these macros will be missing.
So, how can I make sure that I can still use all these styles for old and new pages? How can I still include div and span in my Confluence pages?
Here is my very simple idea:
I include them in the page's html code with the Firefox developer tools.
For my page breaks I would add "<div class="pagebreak">...</div>" as an example.
When I try this in my Confluence pages now, it seems to work with no problem.
But reading some of the feedback pages about the macro removals like https://jira.atlassian.com/browse/CONFCLOUD-65774?error=login_required&error_description=Login+required&state=95f7e532-0a60-4a12-96fb-72653153bd69 I there doesn't seem to be any hint about this possibility.
Am I missing something and this will not work in newer Confluence version?
Along the lines of teaching someone to fish rather than giving them a fish ;-) There is the link to the basics:
And there is a no-print example macro that uses a div tag exactly the way you would need to do it for you needs.
The color as size example below it shows an example with span tags.
As an alternative thought (yet again an idea that I can't verify myself):
Including the div macro the old way with Insert > Other macros, the html code that is actually inserted in the page's "Edit" mode source code seems to be this:
<table class="wysiwyg-macro" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2RpdjppZD10ZXN0fQ&locale=de_DE&version=2); background-repeat: no-repeat;" data-macro-name="div" data-macro-parameters="id=test" data-macro-body-type="RICH_TEXT" data-mce-style="background-image: url('http://lightweb.zumtobelgroup.com/plugins/servlet/confluence/placeholder/macro-heading?definition=e2RpdjppZD10ZXN0fQ&locale=de_DE&version=2'); background-repeat: no-repeat;"><tbody><tr><td class="wysiwyg-macro-body"><p>divtest</p></td></tr></tbody></table>
Stripping that down to its essential would be this and also seems to work ("id=test" and the content "divtest" can be replaced with other names):
<table class="wysiwyg-macro" data-macro-name="div" data-macro-parameters="id=test" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>divtest</p></td></tr></table>
I am not familiar at all with user macros but doesn't that look like the formula that could be used as a starting point for a user macro?
Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...
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