Code Blocks for Confluence
Beautiful, readable code in Confluence: syntax highlighting for 190+ languages, line numbers, highlighted lines, tabs, diffs, copy, collapse and dark mode. Runs entirely on Atlassian.
Insert a code block
- Edit a Confluence page, type /code and choose Code Blocks (or open + → View more and search for "Code Blocks").
- The editor opens. Optionally type a title or filename, e.g.
src/app.ts. - Paste your code. Language is detected automatically, or pick one of 190+ languages.
- Check the preview on the right, then click Save.
To change a block later: edit the page, click the block, then click the pencil icon.
Options
- Highlight lines: line numbers to emphasise, e.g.
3, 7-9. They use the numbers shown in the block. - Diff view: lines starting with
+show in green and lines starting with-in red. Lines starting with@@,---,+++,difforindexare headers. Copy gives you the "after" version without markers. - Tabs: click + Add tab to show several versions side by side, e.g. curl / Python / JavaScript. Each tab has its own label, language, highlighted lines and diff setting. Up to 8 tabs.
- Line numbers and First line number: for excerpts from a longer file.
- Wrap long lines: wraps instead of scrolling sideways.
- Collapsed by default: readers see the title and line count and can expand it.
- Max visible lines: long blocks scroll inside a fixed height. 0 shows everything.
- Colours: GitHub (default) or Classic. Both have light and dark versions.
For readers
- Copy copies the code without line numbers.
- The arrow in the header collapses or expands the block.
- Blocks switch between light and dark automatically with your Confluence theme (profile → Theme).
FAQ
How big can a block be?
Up to 100,000 characters across all tabs.
Where is my code stored?
Inside the Confluence page, like the rest of the page's content. The app stores nothing itself and needs no permissions.
What if the licence expires?
Your code still shows as plain text, so pages never lose content. Highlighting comes back when the licence is active again.
Does data leave Atlassian?
No. The app runs on Atlassian Forge with the highlighter bundled in, and it makes no external calls. See the privacy policy.
Support
Email nudge4.support@gmail.com. We aim to reply within 2 business days.