# @m2d/emoji

> A plugin for @m2d/core that parses emoji shortcodes like :smile: and replaces them with their corresponding Unicode emoji characters for DOCX output.

Latest version **0.1.3** (published 2025-06-06) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install @m2d/emoji
pnpm add @m2d/emoji
yarn add @m2d/emoji
bun add @m2d/emoji
```

## Health

**Score 45/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2025-06-06 |
| First published | 2025-03-25 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 267.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | Mayank Kumar Chaudhari |
| Maintainers | mayank1513 |
| Keywords | emoji, emoji-plugin, emoji-support, shortcode, unicode, text-processing, markdown-to-docx, mdast-to-docx, mdast, markdown, md2docx, mdast2docx, plugin, converter, docx, ms-word, document-generator, document-generation, remark, unified, images, hyperlinks, footnotes, typescript, open-source, customizable, modern, seamless-integration, cutting-edge, compatibility, progressive, web-development, frontend, automation, google-sheets, generative-ai, rich-text, m2d, mayank1513 |

## Links

- npm: https://www.npmjs.com/package/@m2d/emoji
- Repository: https://github.com/md2docx/md2docx-plugin-template
- Homepage: https://github.com/md2docx/md2docx-plugin-template/#readme
- Issues: https://github.com/md2docx/md2docx-plugin-template/issues
- Funding: https://github.com/sponsors/mayank1513
- npm.io page: https://npm.io/package/@m2d/emoji

## Dependencies (1)

- [@m2d/core](https://npm.io/package/@m2d/core.md) ^1.3.4

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2025-06-06
- 0.1.2 — 2025-05-20
- 0.1.1 — 2025-04-08
- 0.1.0 — 2025-03-25
- 0.0.0 — 2025-03-25

## README

# @m2d/emoji

[![test](https://github.com/md2docx/md2docx-plugin-template/actions/workflows/test.yml/badge.svg)](https://github.com/md2docx/md2docx-plugin-template/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/aa896ec14c570f3bb274/maintainability)](https://codeclimate.com/github/md2docx/md2docx-plugin-template/maintainability) [![codecov](https://codecov.io/gh/md2docx/md2docx-plugin-template/graph/badge.svg)](https://codecov.io/gh/md2docx/md2docx-plugin-template) [![Version](https://img.shields.io/npm/v/@m2d/emoji.svg?colorB=green)](https://www.npmjs.com/package/@m2d/emoji) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/@m2d/emoji.svg)](https://www.npmjs.com/package/@m2d/emoji) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@m2d/emoji)

> 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/emoji
```

**_or_**

```bash
yarn add @m2d/emoji
```

**_or_**

```bash
npm add @m2d/emoji
```

---

## 🧠 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)

---

<p align="center">Made with 💖 by <a href="https://mayank-chaudhari.vercel.app" target="_blank">Mayank Kumar Chaudhari</a></p>

---
_Source: https://npm.io/package/@m2d/emoji · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
