Is there a way to have syntax highlighting and a dark background color in code snippet?

Lynoure Braakman June 11, 2024

We are evaluating Confluence as a wiki for software development. Thus lot's of the pages have code in them. However, "Customize code macro" setting does seemingly nothing. Is there some way to get full syntax highlighting and a dark background for the code snippets?

1 answer

1 vote
Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2024

Welcome to the community @Lynoure Braakman 

For dark background in Confluence you can use the dark theme. For the syntax highlighting you can use the app Advanced Code Syntax Highlighter. It supports over 220 programming languages and it can match the requirements that you have.

Let me know if this solution suits you.

Lynoure Braakman June 11, 2024

I went through all of the Configure Code Macro themes and none of them gave me any other background color for the code snippet than the default light gray. What's the dark theme you refer to?

For syntax highlighting, thank you for the pointer. I'll check it out!

Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2024

It is the dark theme that is a native part of the Confluence. Click on your avatar, then look for Theme, and there you can find the Dark theme.

With this you would combine using the dark theme with the app that I have posted.

Lynoure Braakman June 11, 2024

Thanks. Alas, I was looking to have only the code snipped dark, for better readability and differentiation. 

Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2024

This app will be able to help you with that, since it can have the snippets stylized.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events