Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Code Block Macro - No Syntax Highlighting

Rickey Whitworth
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!
January 19, 2025

When I use the Code Block Macro in Confluence Cloud (/code) I have the option to pick different languages. 

However, it doesn't matter what language I choose, I am not getting any kind of highlighting for the code. They all look the same, white text on a dark background.

Screenshot 2025-01-19 133217.png

2 answers

1 accepted

1 vote
Answer accepted
Kristian Klima
Community Champion
January 20, 2025

Hi @Rickey Whitworth and welcome to the Community.

The code highlights will be visible once you save / publish the page. It's not displayed in the edit mode.

See the Python sample behavior

2025-01-20_09-09-09.gif

0 votes
Simon_NGPILOT_
Atlassian Partner
May 10, 2026

Hi @Rickey Whitworth ,

Just adding to @Kristian Klima 's answer — the native Code Block Macro does show syntax highlighting after publishing, but it has some limitations:

  • No live preview while editing
  • Limited theme options
  • Basic language support

If you need more control, there's a newer app called Modern Code Blocks for Confluence that addresses these gaps:

  • 85+ languages with proper syntax highlighting
  • Monaco editor — the same editor VS Code uses
  • Live preview — see how your code looks before saving
  • Auto theme sync — matches Confluence's light/dark mode automatically
  • Customization — line numbers, word wrap, font size, minimap

Check it out: https://marketplace.atlassian.com/apps/3525717923/modern-code-blocks-for-confluence

 It's especially useful for engineering teams sharing code snippets regularly.

 

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