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

0 votes
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.

0 votes
Bill Bailey Community Champion Nov 29, 2016

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

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

60 views 3 2
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