
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
marklassian
Advanced tools
A lightweight JavaScript library that transforms Markdown to the Atlassian Document Format (ADF). Built for easy integration with Atlassian products and APIs.
Visit our interactive playground to experiment with Markdown to ADF conversion in real-time.
npm install marklassian
import { markdownToAdf } from 'marklassian';
const markdown = '# Hello World';
const adf = markdownToAdf(markdown);
For cases where Markdown doesn't cover a required Confluence or Jira structure (macros, panels, status badges, etc.), you can embed raw ADF nodes directly inside <adf> tags:
# My page
<adf>
{"type":"extension","attrs":{"extensionType":"com.atlassian.confluence.macro.core","extensionKey":"status","parameters":{"macroParams":{"title":{"value":"Done"},"colour":{"value":"Green"}}}}}
</adf>
More content here.
The content inside <adf>…</adf> must be either:
"type" string property, orThis matches the structure of a node in an ADF document's content array. All attrs, content, and marks fields are passed through unchanged.
If the tag content is not valid JSON, or any parsed value is not an object with a "type" string, markdownToAdf will throw an error.
⚠️ Please note
<adf> must appear as a block-level element — surrounded by blank lines. Inline placement (e.g. inside a sentence) will result in the tag being treated as inline HTML and the content will not be parsed as ADF.markdownToAdf(markdown: string): AdfDocumentConverts a Markdown string to an ADF document object (JSON serialisable).
type AdfNode = {
type: string;
attrs?: Record<string, any>;
content?: AdfNode[];
marks?: AdfMark[];
text?: string;
};
type AdfMark = {
type: string;
attrs?: Record<string, any>;
};
type AdfDocument = {
version: 1;
type: 'doc';
content: AdfNode[];
};
Marklassian aims to provide a lightweight, fast and mostly accurate conversion from Markdown to ADF.
If you have complex Markdown or require strict conformance to the ADF format, you may need want to use the official Atlassian libraries. These are hefty dependencies that may bloat your project and require manual tree shaking.
The following example demonstrates how to use the official Atlassian libraries for Markdown to ADF conversion:
import { defaultSchema } from '@atlaskit/adf-schema';
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
const jsonTransformer = new JSONTransformer();
const markdownTransformer = new MarkdownTransformer(defaultSchema);
const markdownDocument = '';
const adfDocument = jsonTransformer.encode(markdownTransformer.parse(markdownDocument));
Sourced from https://jira.atlassian.com/browse/JRACLOUD-77436
For those interested in the ADF format, the following resources may be helpful:
MIT
FAQs
Converts markdown to the Atlassian Document Format (ADF)
The npm package marklassian receives a total of 19,603 weekly downloads. As such, marklassian popularity was classified as popular.
We found that marklassian demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.