| Crates.io | md2jsx |
| lib.rs | md2jsx |
| version | 1.0.1 |
| created_at | 2026-01-04 14:22:35.367933+00 |
| updated_at | 2026-01-04 14:25:05.977368+00 |
| description | High-performance Markdown to JSX AST transpiler for Web and Android |
| homepage | |
| repository | |
| max_upload_size | |
| id | 2021945 |
| size | 11,972,752 |
High-performance Markdown to JSX AST transpiler for Web (WASM) and Android (JNI).
This library parses Markdown (including GitHub Flavored Markdown) and converts it into a JSON-serializable Abstract Syntax Tree (AST) that can be easily rendered by React, Act, or other JSX-like runtimes.
pulldown-cmark.allowed_tags.npm install @clevertree/md2jsx
Add to your build.gradle:
dependencies {
implementation 'com.clevertree:md2jsx:0.1.0'
}
[dependencies]
md2jsx = "0.1.0"
import init, { parse_markdown } from '@clevertree/md2jsx';
async function run() {
await init();
const markdown = "# Hello\n<CustomBox title=\"Alert\">Content</CustomBox>";
const options = {
allowed_tags: ["CustomBox"]
};
const ast = parse_markdown(markdown, options);
console.log(ast);
}
val parser = Md2JsxParser()
val markdown = "# Hello"
val options = TranspileOptions(allowedTags = listOf("CustomBox"))
val astJson = parser.parse(markdown, options)
The output is a list of nodes:
[
{
"type": "element",
"tag": "h1",
"props": {},
"children": [
{ "type": "text", "content": "Hello" }
]
}
]
MIT OR Apache-2.0