Sometimes I just want a fixed-width font without it being a code snippet

Scott Bickerton August 27, 2023

Often in our documentation sites, and those we manage for our clients, we want do display information in monospace font, without necessarily wanting it in a code block or an inline code block. I also like to be able to format (colour / bold) the text in the fixed-width font.

Examples are:

  • Displaying code, but I want to highlight particular sections or words which are referred to in the accompanying documentation, or apply my own colour highlighting rather than pre-determined syntax highlighting
  • Displaying example commands for users to enter in to a terminal, where I want to highlight the variables in a different colour
  • Displaying example terminal output, with text colours as the user would see on their screen.

I personally have a convention on our documentation sites where instruction text (e.g. command examplees) are displayed in a white panel, whereas the resultant terminal output is displayed in a black panel.

With the loss of the panel macro since migrating to Confluence Cloud, there doesn't appear to be any way to use fixed-width font outside of of code snippet or inline code block. This is extremely limiting in terms of presenting code-based or terminal-based knowledge base items.

Does anyone else experience the same or have any suggestions for workarounds?

1 answer

0 votes
Steve Karcher
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 18, 2024
  1. Create a one-cell, unformatted table
    1. Hold the shift key, click the insert table icon, select one box
  2. Place the cursor inside the box
  3. Either
    1. Select Monospace from the More Formatting icon
      1. Paste code snippet as plain text
      2. Manually format
    2. Paste HTML-formatted code snippet
      1. Fix formatting as needed

Screenshot 2024-04-18 114344.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events