Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I add a css class without using source editor?

Sharon Metzger November 29, 2016

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

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

Sharon Metzger November 29, 2016

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events