Skip to content

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

License

Notifications You must be signed in to change notification settings

md2docx/jsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@m2d/jsx

test Maintainability codecov Version Downloads npm bundle size

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
  • Works seamlessly within the mdast2docx plugin ecosystem
  • Easy to integrate and lightweight

📦 Installation

pnpm install @m2d/jsx

or

yarn add @m2d/jsx

or

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 and more — if a shortcode is not recognized, it will remain unchanged.


🛠️ Development

# 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:


Made with 💖 by Mayank Kumar Chaudhari

About

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

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published