Markdown
The content editor supports two writing formats, selectable per item: HTML (default rich editor) and Markdown (CodeMirror plain-text editor). The format is stored in $item['content_format']. Themes never need to branch on it — render_content_html() detects it and runs the Markdown conversion automatically before the shortcode pipeline.
Headings
# H1
## H2
### H3
#### H4
Every heading gets an id="toc-{slug}" anchor automatically, compatible with the [toc] shortcode. The toolbar's Headings dropdown covers H1–H4; H5 and H6 aren't in the dropdown but work fine if typed by hand (#####, ######) — the parser supports all six levels.
Inline formatting
| Syntax | Output |
|---|---|
**bold** / __bold__ | bold |
*italic* / _italic_ | italic |
~~strikethrough~~ | |
` inline code | inline code` | |
{#hex:text} | text in that color |
Text color
This word is {#e74c3c:red}, and this one is {#2ecc71:green}.
Will show: This word is red, and this one is green.
Renders as <span style="color:#hex">text</span>. Any 3- or 6-digit hex color works. The toolbar's color-picker button inserts this syntax automatically around the selected text — there's no need to memorize the format, but it's plain enough to type by hand. Other inline formatting still works inside the colored span: {#e74c3c:some **bold** word}.
Links and images
[Link text](https://example.com)

Open in a new tab: [Text](https://example.com{:target="_blank"}).
Image resizing
Append a size hint after the URL and a space:
| Syntax | Effect |
|---|---|
=300x | width="300", height scales automatically |
=x200 | height="200", width unconstrained |
=300x200 | Both dimensions set |
=50%x | Percentage instead of pixels |
Resized images always keep max-width: 100%, so they never overflow on small screens.
Image captions are not supported.  does not produce a <figure>/<figcaption> — the quoted text is misparsed into the link markup instead. If you need a captioned image, write that block as HTML directly (switch that item's content_format to html, or wrap just that image in a raw HTML snippet) rather than Markdown.
Lists
Any of -, *, + for unordered; 1. for ordered. Nesting works at any depth — indent child items by 2+ spaces, and ordered/unordered levels can mix freely:
- Unordered parent
1. Ordered child
2. Ordered child
Blank lines between items are tolerated without closing the list.
Blockquotes
> This is a blockquote.
> It can span multiple lines.
Footnotes
Two-part syntax: an inline marker, and a definition anywhere in the document (conventionally at the bottom).
This claim needs a source.[^1] Multiple citations can stack.[^2] [^3]
[^1]: Author, A. (2023). Title. *Journal*. https://example.com
[^2]: Author, B. (2022). Another title.
[^3]: Author, C. (2021). Third source.
The marker renders as a superscript link; the definition renders as a numbered entry in a <section class="footnotes"> block appended after the content. Labels can be any alphanumeric string ([^1], [^smith2023]) and must be unique within the document — reusing a label silently overrides the earlier definition with the later one.
Horizontal rule
Any of ---, ***, ___.
Tables (GFM)
| Column A | Column B |
|---|---|
| Value 1 | Value 2 |
Column alignment syntax (:---, :---:, ---:) is not supported — all columns render left-aligned.
Fenced code blocks
```php
echo render_content_html($item['content'], $item);
```
Any language identifier works; syntax highlighting is applied client-side (highlight.js), loaded automatically only on pages whose rendered HTML actually contains a code block.
Hard line breaks
Two trailing spaces at the end of a line produce <br>.
Containers (:::)
The Markdown equivalent of the [callout] shortcode:
\x00CALLOUT1\x00
| Alias | Rendered type | Color |
|---|---|---|
info, note | info | Blue |
warning, caution | warning | Orange |
tip, success | tip | Green |
danger, error | danger | Red |
CMS shortcodes in Markdown
All shortcodes work normally — they're preserved intact through Markdown conversion and parsed afterward by the shortcode pipeline: [recent_articles limit="3"], [contact_form], etc.
Square brackets inside fenced code blocks and inline code spans are HTML-entity-encoded during conversion ([ → [), so a code example showing shortcode syntax is never itself parsed as a live shortcode.
Limitations
- No image caption support (see warning above).
- Table column alignment is not supported.
- Raw HTML embedded in Markdown passes through as-is — use with care.
- The parser is a lightweight custom implementation, not CommonMark-compliant; complex nested formatting edge cases may not render as expected.
- Footnote labels must be unique per document.
