You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hello,
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?
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?
The most rock-solid way is the create a user macro that wraps you content in these tags. I know I have used it in classed p div tags as last as version 6.13.8
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you post your code? Are there other up-to-date places where people exchange user macros?
I had the impression that the div and span macro is missed by many but don't seem to find much information about what people do about it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Enjoy!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond. A long time favorite, Team Cale...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.