https://github.com/md2docx/image
MDAST to DOCX plugin for resolving and embedding images. Supports base64, URLs, and custom resolvers for seamless DOCX image integration.
https://github.com/md2docx/image
Last synced: 2 months ago
JSON representation
MDAST to DOCX plugin for resolving and embedding images. Supports base64, URLs, and custom resolvers for seamless DOCX image integration.
- Host: GitHub
- URL: https://github.com/md2docx/image
- Owner: md2docx
- License: mpl-2.0
- Created: 2025-03-25T17:52:25.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T08:23:16.000Z (2 months ago)
- Last Synced: 2025-04-02T09:29:27.852Z (2 months ago)
- Language: JavaScript
- Size: 332 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
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/image
[](https://github.com/md2docx/image/actions/workflows/test.yml) [](https://codeclimate.com/github/md2docx/image/maintainability) [](https://codecov.io/gh/md2docx/image) [](https://www.npmjs.com/package/@m2d/image) [](https://www.npmjs.com/package/@m2d/image) 
> 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/image
```**_or_**
```bash
yarn add @m2d/image
```**_or_**
```bash
npm add @m2d/image
```---
## 🧠 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