MarkdownRenderX.Avalonia.Emoji
12.1.3.8
dotnet add package MarkdownRenderX.Avalonia.Emoji --version 12.1.3.8
NuGet\Install-Package MarkdownRenderX.Avalonia.Emoji -Version 12.1.3.8
<PackageReference Include="MarkdownRenderX.Avalonia.Emoji" Version="12.1.3.8" />
<PackageVersion Include="MarkdownRenderX.Avalonia.Emoji" Version="12.1.3.8" />
<PackageReference Include="MarkdownRenderX.Avalonia.Emoji" />
paket add MarkdownRenderX.Avalonia.Emoji --version 12.1.3.8
#r "nuget: MarkdownRenderX.Avalonia.Emoji, 12.1.3.8"
#:package MarkdownRenderX.Avalonia.Emoji@12.1.3.8
#addin nuget:?package=MarkdownRenderX.Avalonia.Emoji&version=12.1.3.8
#tool nuget:?package=MarkdownRenderX.Avalonia.Emoji&version=12.1.3.8
MarkdownRenderX.Avalonia.Emoji
GitHub / GitMoji shortcode support for MarkdownRenderX.Avalonia. Turns :beer:, :tada:, :+1: and ~1900 other shortcodes into native Unicode emoji — selectable text, no images, no WebView, no style files.
Install
dotnet add package MarkdownRenderX.Avalonia.Emoji
Quick start
Register once at startup (e.g. App.OnFrameworkInitializationCompleted or Program.Main):
using MarkdownRenderX.Avalonia.Emoji;
EmojiExtension.Register();
That's all — no StyleInclude, no extra style file. All MarkdownRender instances pick it up. Since 12.1.3.6 the companion FluentAvalonia.MarkdownRender package shares the same extension registry, so one Register() call covers both renderers:
Ship it! :beer: :tada: :+1:
renders as 🍺 🎉 👍.
Data
- The shortcode table is generated from github/gemoji's
db/emoji.json(all aliases). - GitMoji shortcodes were merged as well; every GitMoji code was already covered by gemoji, so it contributes no duplicates.
- 1913 shortcodes total, shipped as a compact 41 KB embedded resource (~41 KB to the package), loaded lazily on first use.
- Deserialization uses a source-generated
JsonSerializerContext, so it works under AOT / trimming.
Behavior
| Input | Result |
|---|---|
:beer: in normal text |
🍺 |
:BEER: |
🍺 (case-insensitive) |
:+1: / :-1: |
👍 / 👎 |
`:beer:` (inline code) |
unchanged |
:beer: inside a fenced code block |
unchanged |
:definitely_not_an_emoji_xyz: |
unchanged (unknown codes are left as-is) |
Only LiteralInline nodes are touched. Code inlines and fenced code blocks are different Markdig node types, so they are never rewritten. The replacement returns a Run, so the result stays selectable and copyable text — not an embedded control.
Shortcodes are matched with
:([a-z0-9_+\-]+):. Times like12:30:and URLs are safe: unknown codes are kept verbatim.
Combining with other extensions
Registration is global and additive, so it works alongside the KaTeX math extension:
using MarkdownRenderX.Avalonia.KaTeX;
using MarkdownRenderX.Avalonia.Emoji;
KaTeXExtension.Register();
EmojiExtension.Register();
EmojiExtension.Unregister() removes the renderer again. EmojiExtension.ShortcodeCount reports the loaded table size (useful for diagnostics).
Limitations
- Emoji glyphs come from the operating system's emoji font, so their appearance varies by platform — this is a text-only renderer by design.
- Custom shortcodes are not supported yet.
- Skin-tone modifiers (
:+1::skin-tone-2:) are not expanded.
License
- This package: MIT
- Shortcode data: MIT (gemoji / GitMoji) — see THIRD_PARTY_NOTICES.md
- Emoji glyphs are rendered by the OS font; no font is redistributed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Avalonia (>= 12.1.3)
- MarkdownRenderX.Avalonia (>= 12.1.3.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Emoji shortcode extension for MarkdownRenderX.Avalonia: registers an inline renderer that maps GitHub (gemoji) and GitMoji shortcodes to Unicode characters, with no extra dependencies or style files.