Djot Markup adds support for the Djot markup language in WordPress. Djot is created by John MacFarlane (creator of CommonMark and Pandoc) and offers cleaner syntax with more consistent parsing rules than Markdown.
Features
Full Djot Support: Headings, emphasis, links, images, code blocks, tables, footnotes, and more
Shortcode Support: Use [djot]...[/djot] in your content
Content Filtering: Automatically process {djot}...{/djot} blocks
Table of Contents: Automatic TOC generation from headings with configurable levels and position
Safe Mode: XSS protection for untrusted content
Syntax Highlighting: Server-side highlighting with Torchlight Engine
Admin Settings: Easy configuration through WordPress admin
Template Tags: Functions for theme developers
Dark Mode Support: CSS adapts to dark mode preferences
Usage
Shortcode:
[djot]
# Hello World
This is _emphasized_ and this is *strong*.
- List item 1
- List item 2
[/djot]
Djot is a light markup syntax created by John MacFarlane, the creator of CommonMark and Pandoc. It’s designed to be a cleaner, more consistent alternative to Markdown.
Why use Djot instead of Markdown?
Djot has cleaner syntax rules, proper footnote support, attributes for styling, and avoids many of Markdown’s parsing ambiguities.
Is it safe for user comments?
Yes! Enable “Safe Mode” in settings to sanitize untrusted content and prevent XSS attacks. Comments always use safe mode by default.
Can I use my own CSS?
Yes, you can override the default styles by targeting the .djot-content class in your theme’s CSS.
Does it work with Gutenberg?
Yes, you can use the shortcode block to add Djot content in the block editor.
Security: the public comment-preview endpoint is now gated (403 when Djot comments are disabled) and per-IP rate-limited, so anonymous callers can no longer drive the render pipeline unbounded; editors are exempt and input is capped.
Security: updated the bundled djot-php library to 0.1.32 – two XSS fixes (the raw-HTML image fallback and raw HTML minted from a foreign code fence) and a nested-bracket denial-of-service fix.
The Markdown and HTML paste-conversion endpoints reject input over 512 KB with a 413 instead of converting an arbitrarily large paste.
The [djot] shortcode is excluded from wptexturize, so titled fences like ::: tab “Overview” keep their quotes.
The stylesheet loads only on views that actually render Djot; the wpdjot_enqueue_styles filter can force it.
Minimum WordPress raised to 6.3 (the block uses Block API v3).
Assets cache-bust by file mtime instead of the plugin version, so hotfixes that do not bump the version still invalidate CDN and browser caches.
The release zip installs into the canonical djot-markup folder, so a manual admin upload replaces the existing plugin instead of creating a duplicate beside it.
Dark-mode styles (admonitions, tabs, code groups, comment tabs) follow a site-level theme toggle in both directions, matching the code blocks.
Mermaid diagrams render in the effective color scheme (site toggle or OS preference) and re-render on scheme changes, without capturing already-rendered SVG as source.
Dark-mode code themes actually activate now: code blocks follow prefers-color-scheme and a site theme toggle wins over the OS; dual-theme style attributes are normalized.
Torchlight highlighting: a more robust phiki capture-offset patcher (closing inline delimiters keep their scope), the dist build installs without Composer scripts, and the dark-theme CSS covers every highlighter span.
1.5.17
Safe mode now defaults to on for fresh installs: with no saved settings yet, rendering previously ran with safe mode disabled until the settings page was saved once.
Safe mode is forced when DISALLOW_UNFILTERED_HTML is set, mirroring how core strips the unfiltered_html capability.
The visual editor no longer loses admonition titles ({title=”…”}) on a round trip: the title is captured, stays visible while editing, and serializes back to the attribute line.
Changed minimum djot-php library to 0.1.31: tab set and code group ids are deduplicated against explicit ids and heading anchors, so a colliding id attribute or heading slug no longer produces duplicate DOM ids with broken tab wiring. Also hardens URL schemes in the non-HTML renderers and derives heading ids from source text rather than smart-punctuation glyphs.
Updated bundled Mermaid to 11.16.
1.5.16
Changed minimum djot-php library to 0.1.29, bringing upstream parser fixes for empty list items, indented and lazily-wrapped list markers, blockquote tab delimiters, and stricter reference definition handling.
Kept heading anchor IDs stable across the upgrade. Djot 0.1.29 now preserves non-ASCII characters in auto-generated IDs by default, but the plugin keeps the ASCII-folded IDs introduced in 1.5.14 (e.g. “Über uns” becomes “Uber-uns”) so existing in-page links keep working.
Fixed the migrate command so shortcodes and Gutenberg blocks are preserved correctly after the djot change that escapes special characters during conversion.
1.5.15
Changed minimum djot-php library to 0.1.28, bringing upstream parser fixes for sequential list-item attributes, numeric reference-label warnings, and nested list blocks with deeper indentation or tabs.
Added the Djot Markup demo video directly to the WordPress.org plugin page.
Fixed Markdown conversion for title-less <abbr> tags so the semantic element is preserved instead of flattened to plain text.
Improved translator context for strings that contain placeholders or literal syntax tokens.
1.5.14
Changed auto-generated heading anchor IDs to be transliterated to ASCII (e.g. “Über uns” becomes “Uber-uns”, “café” becomes “cafe”) so deep links survive being shared through chat, email, and other auto-linkers that mangle non-ASCII fragments. Note: anchors for existing non-ASCII headings change, so update any hardcoded in-page links.
Changed the smart-quotes default for new installs to “Auto (from site language)” so a non-English site gets the right typographic quotes out of the box. Existing sites that already saved a quote setting are unaffected.
Changed Mermaid to load from the bundled copy instead of an external CDN, so diagrams render without an external request (better privacy, reliability, and offline support).
Changed minimum djot-php library to 0.1.27.
Tested up to WordPress 7.0.
1.5.13
Fixed shell/bash code blocks flooding the error log with PCRE lookbehind compile warnings by upgrading torchlight/engine to ^1.0 (pulls phiki 2.x, which tokenizes with Oniguruma instead of PCRE)
Changed markdown and djot fenced code blocks to use real syntax highlighting again — the plain-text fallback was only needed to dodge phiki 1.x’s PCRE issues and is no longer required