Convert Extended Markdown to Atlassian Document Format (ADF) with full feature support and customization options.
Overview
The library features a unified architecture (v2.1.6+) with consistent, high-quality conversion across all parser interfaces. All parsers now use shared conversion engines internally.
Unified Parser Architecture (v2.1.6+)
The library provides multiple interfaces to the same high-quality conversion engine:
Main Parser Class (Recommended)
The unified Parser class provides all features by default:
import{Parser}from'extended-markdown-adf-parser';// All features enabled by defaultconstparser=newParser({strict:false,// Error recovery enabledpreserveUnknownNodes:true// Preserve unknown ADF nodes});// Synchronous parsingconstadf=parser.markdownToAdf(markdown);// Asynchronous parsingconstadf2=awaitparser.markdownToAdfAsync(markdown);
import { EnhancedMarkdownParser } from 'extended-markdown-adf-parser';
// Identical functionality to Parser class
const parser = new EnhancedMarkdownParser();
// Alternative API methods
const adf = parser.parseSync(markdown); // Same as parser.markdownToAdf()
const adf2 = await parser.parse(markdown); // Same as parser.markdownToAdfAsync()
const statusMarkdown = `
# Project Status Dashboard
**Authentication Module**: {status:Complete|color:green}
**Dashboard UI**: {status:In Progress|color:yellow}
**API Integration**: {status:Blocked|color:red}
**Testing**: {status:Not Started}
## Team Status
- **Alice Johnson**: {status:Available|color:blue}
- **Bob Smith**: {status:Busy|color:neutral}
- **Carol Davis**: {status:On Vacation|color:purple}
Priority levels: {status:Critical|color:red} {status:High|color:yellow} {status:Normal|color:green}
`;
const parser = new Parser();
const adf = parser.markdownToAdf(statusMarkdown);
// Results in proper ADF status nodes with:
// - Required text and color attributes per Atlassian spec
// - Valid colors: neutral, green, red, yellow, blue, purple
// - Perfect round-trip conversion compatibility
// - Backward compatibility with legacy {status:text} format
{status:Basic Status} # Neutral color (default)
{status:Complete|color:green} # Colored status (new inline syntax)
{status:High Priority|color:purple} # Multi-word status with color
const nestedMarkdown = `
~~~expand title="Project Documentation"
~~~panel type=warning title="Prerequisites"
Before starting, ensure you have:
- Node.js 18+ installed
- Access to the development environment
~~~
~~~mediaSingle layout=wide

~~~
~~~panel type=success title="Success Criteria"
Project is complete when all tests pass ✅
~~~panel type=info title="Testing Notes"
Run the full test suite with \`npm test\`
~~~
~~~
~~~
`;
const parser = new Parser();
const adf = parser.markdownToAdf(nestedMarkdown);
// Result: Properly nested ADF structure with:
// - expand containing all child elements
// - panels nested within the expand
// - mediaSingle properly positioned
// - nested panels within panels