Djot is a lightweight markup language created by the author of CommonMark and Pandoc, designed to fix Markdown's ambiguities with a more consistent and predictable syntax. The php-collective/djot PHP library brings full Djot support to PHP 8.2+ with 100% compatibility with the official test suite. Key features include rich text formatting (highlight, insert, delete, super/subscript), smart typography, task lists, divs with classes, span attributes, and an AST-based architecture. The library offers an extension system with built-in extensions for autolinks, TOC, external links, and heading permalinks, plus a Profile system for restricting markup features per context (e.g., comment sections vs. blog posts). Performance benchmarks show djot-php processes ~2.6 MB/s, faster than league/commonmark but slower than simpler regex-based parsers like Parsedown. A WordPress plugin and IntelliJ IDE plugin are also available. Migration tools support importing from Markdown, HTML, and BBCode.
Table of contents
What is Djot?Use CasesFeature HighlightsTask ListsDivs with ClassesSpans with AttributesCode BlocksThe Markdown Elephant in the RoomWhy Djot Over Markdown?Djot vs Markdown: Quick ComparisonBasic UsageAdvanced UsageMarkdown compatibility modesCustomizationFeature Restriction: ProfilesArchitectureWordPress Plugin: Djot Markup for WPIDE Support: IntelliJ PluginEnhancementsPerformanceFeature ComparisonImporting and MigrationWhat’s Next?Some personal notesLinksSort: