npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

marklassian

v1.2.0

Published

Converts markdown to the Atlassian Document Format (ADF)

Readme

Marklassian

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 version license bundlephobia minzipped size

Features

  • Convert Markdown to ADF with a single function call
  • Support for the most common Markdown syntax
  • TypeScript-ready with full type definitions
  • Works in all modern JavaScript environments (Browsers, Node.js, Deno, Bun)
  • Lightweight (12kb gzipped and minified), doesn't depend on AtlasKit dependencies

Installation

npm install marklassian

Usage

import { markdownToAdf } from 'marklassian';

const markdown = '# Hello World';
const adf = markdownToAdf(markdown);

Supported Markdown Features

  • Headings (H1-H6)
  • Paragraphs and line breaks
  • Emphasis (bold, italic, strikethrough)
  • Links and images
  • Code blocks with language support
  • Ordered and unordered lists with nesting
  • Blockquotes
  • Horizontal rules
  • Tables
  • Task lists (GitHub Flavoured Markdown feature)

Embedding ADF nodes

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:

  • A single JSON object with at least a "type" string property, or
  • A JSON array of such objects

This 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.
  • The embedded ADF nodes are not processed or validated by this library. They are passed through verbatim into the output document. This means that you are responsible for ensuring that the embedded ADF is valid and correctly structured for your use case.

API Reference

markdownToAdf(markdown: string): AdfDocument

Converts a Markdown string to an ADF document object (JSON serialisable).

Types

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[];
};

Caveats

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

References

For those interested in the ADF format, the following resources may be helpful:

License

MIT