https://github.com/md2docx/jsx
A React-compatible renderer for MDAST that supports rendering extended Markdown (with HTML, Mermaid, and more) to both JSX and styled DOCX documents—using a unified syntax tree. Like react-markdown, but with document generation built-in
https://github.com/md2docx/jsx
docx javascript jsx markdown mdast mdast2docx node react remark typescript unified unifiedjs
Last synced: 2 months ago
JSON representation
A React-compatible renderer for MDAST that supports rendering extended Markdown (with HTML, Mermaid, and more) to both JSX and styled DOCX documents—using a unified syntax tree. Like react-markdown, but with document generation built-in
- Host: GitHub
- URL: https://github.com/md2docx/jsx
- Owner: md2docx
- License: mpl-2.0
- Created: 2025-05-16T11:08:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-29T10:21:00.000Z (3 months ago)
- Last Synced: 2026-03-29T13:40:10.559Z (3 months ago)
- Topics: docx, javascript, jsx, markdown, mdast, mdast2docx, node, react, remark, typescript, unified, unifiedjs
- Language: TypeScript
- Homepage:
- Size: 646 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# @m2d/jsx
[](https://github.com/md2docx/jsx/actions/workflows/test.yml) [](https://codeclimate.com/github/md2docx/jsx/maintainability) [](https://codecov.io/gh/md2docx/jsx) [](https://www.npmjs.com/package/@m2d/jsx) [](https://www.npmjs.com/package/@m2d/jsx) 
> Emoji shortcode support for `mdast2docx`
This plugin adds support for emoji shortcodes (e.g., `:smile:`, `:rocket:`) in your Markdown-to-DOCX conversion pipeline. It replaces recognized emoji shortcodes with their corresponding Unicode characters during the MDAST transformation.
---
## ✨ Features
- Converts emoji shortcodes to Unicode emojis (e.g., `:tada:` → 🎉)
- Compatible with [`@m2d/core`](https://www.npmjs.com/package/@m2d/core)
- Works seamlessly within the `mdast2docx` plugin ecosystem
- Easy to integrate and lightweight
---
## 📦 Installation
```bash
pnpm install @m2d/jsx
```
**_or_**
```bash
yarn add @m2d/jsx
```
**_or_**
```bash
npm add @m2d/jsx
```
---
## 🧠 How It Works
This plugin scans all text nodes for emoji shortcodes (e.g., `:fire:`, `:sparkles:`) and replaces them with matching Unicode emojis using a predefined emoji JSON mapping.
---
## 🔍 Emoji Support
It uses the [GitHub-style emoji shortcodes](https://github.com/ikatyang/emoji-cheat-sheet) and more — if a shortcode is not recognized, it will remain unchanged.
---
## 🛠️ Development
```bash
# Clone and install dependencies
git clone https://github.com/md2docx/emoji-plugin
cd emoji-plugin
npm install
# Build / Test / Dev
npm run build
```
---
## 📄 License
Licensed under the **MPL-2.0** License.
---
## ⭐ Support Us
If you find this useful:
- ⭐ Star [mdast2docx](https://github.com/md2docx/mdast2docx) on GitHub
- ❤️ Consider [sponsoring](https://github.com/sponsors/mayank1513)
---
Made with 💖 by Mayank Kumar Chaudhari