It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Text background color to replicate command line interface

Alex Chudacoff Mar 08, 2017

I am trying to replicate a Linux shell interface for a training document in Confluence.

I would like to copy and paste the text from the command line instead of screen-shotting it.

Is there a way to format text with a black background and white text?

See example. The picture you see is all text.


2 answers

0 votes
Milo Grika Mar 08, 2017

Just use a Div macro with CSS styling:

image2017-3-8 14:33:57.png


Put this in the Styles field:

background-color: black; font-family: courier; color: white;



image2017-3-8 14:35:45.png

Davin Studer Community Leader Mar 08, 2017

Or the code macro.

Davin Studer Community Leader Mar 08, 2017

The Code Block macro is installed by default. It should be there unless a system admin has disabled it. The DIV and CSS macros require the Content Formatting Macros add-on. It is a free add-on ... kinda. It is free for the basic html macros (div, span, css, etc.).

image2017-3-8 15:55:28.png

Alex Chudacoff Mar 09, 2017


Yes, the Content Formatting macro is not free, I will see about getting it installed.

For the Code Block, I may be doing something wrong. Does this look right?


Davin Studer Community Leader Mar 09, 2017

The Content Formatting Macros are sorta free. If you install it you get some macros that are free, but others that require a license. Pretty much any of the macros that start with AUI are not free, but the html macros such as div,span,stylesheet,etc are free.

As for the code macro it is not meant to render HTML. It is meant to display the body of the macro as mono spaced text with some optional formatting such a line numbers/themes/syntax highlighting. If you click on the macro you should see an edit button. Click it.

image2017-3-9 8:48:54.png

You should then see an options panel. Change the theme to Django if you want a black background and white text.

image2017-3-9 8:51:10.png

0 votes
Alex Chudacoff Mar 08, 2017

Forgive me gentlemen, I am fairly new at the Confluence interface.

I am not finding "div" or "code" or "style" or "css" when I search in the macro browser.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

2,398 views 11 28
Read article

Community Events

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

Events near you