Can I add a css class without using source editor?

I currently have a few CSS classes in my CSS stylesheets, for example, p.code1first to change a paragraph's font to Courier and indent the margin-left – code1next to do the same formatting, but without a margin-top.

Is there a way to apply these in the regular edit mode, without editing HTML by hand? I can go into source editor and add class="code1first" to a <p> tag, but is there a way to do this via macros or other keyboard shortcuts?

2 answers

This widget could not be displayed.
Davin Studer Community Champion Nov 29, 2016

You can get the Content Formatting for Confluence add-on (free) and use the "p" macro which has a class attribute in it.

Thanks – I was looking at that add-on, and was wondering if it would do. I'll try it out.

This widget could not be displayed.

Or you can create a very simple user macro to do the same thing, allowing you to generate a more complex HTML structure if you need it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

504 views 7 6
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you