Markdown Macro for Confluence - User Guide
- 1 Quick Start
- 2 Interface Overview
- 2.1 Main Components
- 2.2 Toolbar Features
- 2.3 Status Bar
- 2.4 Adjustable Split Pane
- 3 Writing in the Editor
- 4 Content Features
- 5 Import and Export
- 6 Template Library
- 7 Collapsible Display Mode
- 7.1 How to enable it
- 7.2 On the page
- 7.3 Behaviour
- 8 Configuration
- 9 FAQ
- 10 Quick Reference
Markdown Macro for Confluence renders Markdown directly on your Confluence pages. You write in a split-pane editor with live preview, and readers see the rendered result — no conversion step, no copy-paste of HTML.
Recent additions: syntax highlighting and code folding in the editor, find within the document, autocomplete for emoji and code-fence languages, KaTeX math, Mermaid diagrams, a document overview in the status bar, and a maximum height setting for long documents.
Quick Start
Adding the Macro to Your Page
Edit a Confluence page
Type
/markdown, or click Insert → Other macrosChoose Markdown Content
The editor opens automatically so you can start writing straight away
Creating Your First Markdown Content
Type your Markdown in the left editor pane — headings, tables, lists and code are highlighted as you type
Watch the live preview on the right; it scrolls in step with the editor
Use the toolbar if you would rather insert syntax than remember it
Click Save when you are done
Viewing Published Content
After saving, your Markdown is rendered on the Confluence page itself. Readers get:
Clean typography that matches the rest of the page
Tables, lists, quotes and callouts rendered natively
Code blocks with per-language syntax highlighting
Math formulas and Mermaid diagrams drawn as part of the page
Task list checkboxes shown as read-only, so readers cannot change your document by accident
Interface Overview
The editor is a dual-pane workspace: you write on the left, and the rendered result appears on the right.
Main Components
Component | Description |
|---|---|
Header | Collapse toggle, Templates, File (import and export), Settings (gear), and shortcuts to this documentation and to support |
Collapsed title | Appears under the header once Collapse is on — the title readers see on the collapsed card (up to 60 characters) |
Toolbar | Insert menus for headings, inline format, code, lists, tables, links, alerts, structure and math/diagrams |
Left pane | Markdown editor with line numbers, syntax highlighting, code folding, find, and autocomplete |
Right pane | Live preview — exactly what the page will show after you save |
Status bar | Collapse and Height state, a document overview (words, lines, headings, tables, code blocks, links) and the cursor position |
Bottom actions | Cancel discards your changes; Save stores the content with the page |
Collapsible card | Optional wrapper on the page that lets readers expand or collapse the whole macro, with the document title and word count in its header |
Toolbar Features
Each toolbar menu inserts real Markdown — nothing proprietary, so your content stays portable.
Menu | What it inserts |
|---|---|
Headings | Heading levels H1 to H6 |
Format | Bold, italic, strikethrough, underline, highlight, superscript, subscript, quote, divider, today’s date |
Code | Inline code, or Code Block… — a searchable list of every language the macro highlights |
Lists | Bulleted, numbered, task and definition lists |
Tables | Ready-made table skeletons (2×2 up to 5×5, plus 2×5 and 5×2) |
Links | Inline links, bare URLs and reference-style links |
Alerts | Info, warning, success and error callouts |
Structure | Table of contents, section divider, pro-tip callout, important note |
Insert | Math Formula and Mermaid Diagram — both open a picker with ready-to-use examples |
Selecting text first makes the inline formats behave like a word processor: Format → Bold wraps the selection, and running it again on already-bold text removes the markers. With nothing selected, a placeholder is inserted and left selected so you can type straight over it.
Status Bar
The bar along the bottom of the editor keeps the state of the document in view while you write:
Collapse On / Off and Height Auto / <n> px — the two settings that change how the macro appears on the page
Document overview — words, lines, headings, tables, code blocks and links; only non-zero counts are shown
Ln / Col — the cursor position, handy when a reviewer refers to a line number
Adjustable Split Pane
Drag the divider to give either side more room. A badge shows the exact ratio while you drag, and the split stays put for the rest of the session.
Action | Result |
|---|---|
Drag the divider | Resizes the editor and preview panes; the ratio badge follows the pointer |
Double-click the divider | Restores the default 50 / 50 split |
Widen the editor | More room for long lines, wide tables and code |
Widen the preview | Better for checking diagrams, formulas and table layout |
Writing in the Editor
Syntax Highlighting
Markdown structure is coloured as you type: headings by level, list and quote markers, table rules, links, inline code, highlights, footnotes and math. Fenced code blocks sit on a card of their own and are highlighted with the grammar of their language, so a typo in a code sample is visible before you save.
Code Folding
Hover the gutter to fold a heading section, a table or a display formula. Folding a heading takes its subsections with it, which makes long runbooks and API references easy to navigate.
Find Within the Document
Press Cmd/Ctrl + F to open the search panel above the editor. It searches only the Markdown you are editing — the browser’s own find is not involved — and supports match highlighting and replace.
Autocomplete
Emoji — type a colon and at least one letter (
:roc) to pick from the emoji list. Times such as10:30and URLs never trigger it.Code-fence languages — after three backticks, start typing a language name to complete it from the same catalogue the Code Block… dialog uses
Keyboard Shortcuts
Shortcut | Action |
|---|---|
Cmd/Ctrl + B | Bold the selection (or insert a bold placeholder) |
Cmd/Ctrl + I | Italic |
Cmd/Ctrl + K | Insert a link with the URL part selected |
Cmd/Ctrl + F | Find within the document |
Cmd/Ctrl + S | Save and close the editor |
Cmd/Ctrl + Z / Shift + Cmd/Ctrl + Z | Undo / redo |
Tab | Insert two spaces (Markdown-friendly indentation) |
Content Features
1. Real-Time Preview
The preview re-renders as you type and follows the editor line by line, so the passage you are working on stays opposite the cursor even in a long document.
✅ Instant visual feedback
✅ Line-based scroll sync between editor and preview
✅ What you preview is exactly what the page will show
2. Code Blocks
Fenced code blocks are highlighted both in the editor and in the published page. Use Code → Code Block… to search the language list — it is generated from the highlighter itself, so every language the dialog offers really does highlight. A language that is not in the list can still be used; its block renders as plain text.
```typescript
const page = await charges.list({ cursor, limit: 20 });
```3. Math Formulas
Write LaTeX between dollar signs. Inline math uses single dollars, display math uses double dollars. Insert → Math Formula offers common expressions if you would rather not type them.
Inline: the pool must satisfy $C = Q \times T$ at peak.
Display:
$$
P_{\text{wait}} = \frac{(QT)^{c}}{c!} \cdot \frac{c}{c - QT}
$$Formulas are typeset with KaTeX, and the HTML export bakes them in as vector images so an exported file still shows them offline.
4. Diagrams
A fenced block marked mermaid is drawn as a diagram. Flowcharts, sequence diagrams, Gantt charts, state machines, class diagrams, pie charts and ER diagrams are all supported. Insert → Mermaid Diagram opens a catalogue of starting points.
```mermaid
flowchart LR
A[Tag 4.2.0] --> B{CI green?}
B -- yes --> C[Canary 10%]
B -- no --> Z[Abort]
```If a diagram has a syntax error, the macro shows the source instead of failing, so the rest of the page keeps rendering.
5. Supported Markdown Syntax
The macro renders GitHub Flavored Markdown plus a few documentation extras:
Feature | Syntax | Notes |
|---|---|---|
Headings |
| Anchor ids match GitHub, so links written elsewhere still resolve |
Emphasis |
|
|
Highlight |
| Renders with a yellow background |
Sub / superscript |
| Written as HTML, which keeps single |
Tables |
| Column alignment supported |
Task lists |
| Read-only for page readers |
Definition lists |
| Useful for glossaries and error codes |
Footnotes |
| Collected at the end of the document |
Code | Inline backticks, or fenced blocks with a language | Per-language highlighting |
Math |
| KaTeX |
Diagrams | Fenced block marked | Rendered as SVG |
Emoji |
| Shortcodes autocomplete as you type |
Links |
| External links open in a new tab; |
Images |
| Loaded lazily |
Callouts | A quote line starting with an icon, e.g. | The Alerts menu inserts these for you |
Import and Export
Both live in the File menu in the header. Export entries stay disabled while the document is empty.
Importing
Open File → Import
Choose Markdown (.md) — also accepts
.markdownand.txt— or HTML (.html)Pick the file (up to 5 MB); if the editor already has content you are asked before it is replaced
The content appears in the editor, ready to edit
Character encoding is detected automatically, so files saved by Windows editors or exported from other wikis come in with their accents intact. HTML is converted to Markdown on the way in: Word and Google Docs exports, tables without header rows, and inline-styled text are all normalised into clean Markdown.
Exporting
Open File → Export
Choose Markdown (.md) for the source, or HTML (.html) for a self-contained page
The file downloads to your device
Format | What you get |
|---|---|
Markdown (.md) | Your source, byte for byte — open it in any editor or commit it to a repository |
HTML (.html) | One self-contained file: styles inlined, code pre-highlighted, formulas as vector images and diagrams as inline SVG. It needs no network access, and importing it back reproduces the original Markdown. |
Template Library
Twelve templates cover the documents teams write most often. Open Templates, pick one, and it is inserted as ordinary Markdown that you can edit freely.
Template | Description | Best for |
|---|---|---|
Meeting Notes | Structured minutes with agenda and action items | Team meetings, standups |
Project Documentation | Project overview with timeline and team structure | Project kickoffs, planning |
Requirements Document | Functional and non-functional requirements | Feature specs, PRDs |
API Documentation | API reference with endpoints and examples | REST APIs, SDKs |
Release Notes | Release announcement with features and fixes | Product updates |
Bug Report | Bug report with reproduction steps | QA, issue tracking |
User Story | Agile user story with acceptance criteria | Sprint planning |
Post-Mortem | Incident analysis with action items | Incident reviews |
Onboarding Guide | Onboarding checklist and resources | HR, team onboarding |
Sprint Retrospective | Retrospective with feedback and actions | Sprint reviews |
Technical Guide | Technical documentation and setup guide | How-to guides, tutorials |
Changelog | Version history in the Keep a Changelog style | Release management |
Applying a template to a document that already has content asks for confirmation first, so nothing is lost by accident.
Collapsible Display Mode
Long documents do not have to dominate the page. With collapsible mode on, the macro renders as a card that readers open when they need it.
How to enable it
Open the macro editor
Turn on the Collapse toggle in the header
Optionally type a Collapsed title (up to 60 characters)
Click Save
On the page
Collapsed, the card shows the title and the word count:
One click expands it in place — the rest of the page keeps its layout:
Behaviour
The header shows your Collapsed title, or the first
#heading if you left it empty, plus the word countContent starts collapsed for everyone
Expanding is per-reader — it does not change what anyone else sees
Nothing changes in your Markdown; this is a macro-level setting
Configuration
Both display settings are stored with the macro, so every reader of the page sees the same thing.
Maximum Content Height
Click the gear icon in the header to open Settings.
Leave Maximum height empty (the default) and the macro is exactly as tall as its content
Set a value and longer documents scroll inside the macro instead of stretching the page — useful for reference material embedded next to other content
The minimum is 50 px; the change takes effect when you save the macro
The current state is always visible on the Height pill in the status bar.
Collapsible Mode and Collapsed Title
The Collapse toggle and the Collapsed title field sit in the editor header — see Collapsible Display Mode above. An empty title falls back to the first heading in your Markdown.
What Gets Saved
Clicking Save stores your Markdown source together with the collapse and height settings on the Confluence page. The rendered HTML is produced when the page is viewed, which means your content is never frozen into stale markup — improvements to the renderer apply to documents you saved months ago. Cancel discards unsaved changes.
FAQ
General
Q: What Markdown syntax is supported? A: GitHub Flavored Markdown — tables, task lists, fenced code with highlighting — plus footnotes, definition lists, ==highlight==, emoji shortcodes, KaTeX math and Mermaid diagrams. See Supported Markdown Syntax above.
Q: Can I edit the macro after saving? A: Yes. Edit the page and click the macro; the editor reopens with your content.
Q: Will my content be preserved if I cancel? A: No — Cancel discards unsaved changes. Use Save, or Cmd/Ctrl + S, to keep your work.
Q: Does the macro work in dark mode? A: Yes. The rendered content, code themes and diagrams all follow the Confluence theme.
Editor
Q: How do I search inside a long document? A: Press Cmd/Ctrl + F for the editor’s own find panel, which also supports replace.
Q: Can I collapse sections while writing? A: Yes. Hover the gutter next to a heading, table or display formula and click the fold arrow. Folding a heading also folds its subsections.
Q: Do brackets and quotes close automatically? A: Yes, brackets and quotes are closed for you as you type, the same way as in most code editors.
Q: What does “Ln 10, Col 71” in the status bar mean? A: The cursor position — line 10, column 71. It makes review comments that refer to a line number easy to follow.
Import and export
Q: What file formats can I import? A: Markdown (.md, .markdown, .txt) and HTML (.html, .htm), which is converted to Markdown automatically.
Q: What is the maximum file size for import? A: 5 MB.
Q: My imported file came from Word — will the formatting survive? A: Word and Google Docs exports are normalised on import: inline-styled bold/italic becomes real Markdown, Word list paragraphs become lists, and tables without header rows are squared off into GFM tables.
Q: Is the exported HTML usable offline? A: Yes. Styles are inlined, code is pre-highlighted, formulas are vector images and diagrams are inline SVG. The file needs no network access.
Q: Can I re-import a file I exported? A: Yes — exported HTML round-trips back to the Markdown it came from, including math and diagram sources.
Rendering
Q: Why does my preview look different from the saved content? A: It should not: the preview and the page use the same renderer. Minor differences can come from the width of the page column. If you see a real difference, please contact support.
Q: A Mermaid diagram will not render — what happens? A: The macro shows the diagram source instead of an error, so the rest of the document still renders. Check the diagram syntax in the editor preview.
Q: Can readers tick my task list checkboxes? A: No. Checkboxes are read-only on the page, so your document cannot be changed by a stray click.
Q: Do links inside the macro work? A: Yes. External links open in a new tab, links to other Confluence pages open normally, and #anchor links scroll within the document.
Display
Q: How do I stop a long document from taking over the page? A: Either turn on Collapse so it renders as a card, or set a Maximum height in Settings so it scrolls inside the macro.
Q: Can I set a custom title for the collapsed card? A: Yes — the Collapsed title field in the header, up to 60 characters. Leave it empty to use the first heading.
Q: Will all readers see the content collapsed? A: Yes, it starts collapsed for everyone. Each reader can expand or collapse it independently.
Q: Can I put several Markdown macros on one page? A: Yes. Each macro keeps its own content and settings.
Templates
Q: Can I create custom templates? A: Not yet — twelve built-in templates are provided, and custom templates are planned. In the meantime you can keep your own starting points as Markdown files and import them.
Q: Are templates editable after insertion? A: Yes. A template is just Markdown in the editor; change or delete anything you like.
Quick Reference
I want to… | Do this |
|---|---|
Insert the macro | Type |
Start from a template | Templates in the editor header |
Add a code block | Code → Code Block…, then search for the language |
Add a formula | Insert → Math Formula, or type |
Add a diagram | Insert → Mermaid Diagram, or open a |
Import a file | File → Import |
Export the document | File → Export |
Search the document | Cmd/Ctrl + F |
Collapse the macro on the page | Collapse toggle in the header |
Limit the macro height | Settings (gear) → Maximum height |
Save | Save, or Cmd/Ctrl + S |
Markdown syntax cheatsheet: github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet