Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Mahgen Renderer

michaelfw-uimichaelfw-ui241 downloads

Display mahjong images inline or in block using Mahgen.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates5

This is a plugin for mahgen to render in Obsidian

If you have opinions or suggestions, please open issues to let me know, or open pull requests fix it directly!

Install

(If this plugin was accepted)

  1. Open Obsidian.
  2. Go to Settings > Community Plugins > Browse.
  3. Search for mahgen.
  4. Click Install and enable the plugin.

Build

To build the plugin, use the following commands:

npm i
npm run dev

Make the folder .obsidian/plugins/obsidian-mahgen-plugin, and copy main.js, styles.css, manifest.json inside. Go to Settings > Community Plugins. Enable 'Allow installing plugins from outside the Obsidian Hub.' Enable this plugin.

Usage

usage

You can use mg 1s2s3s, or mahgen 1112345678999m_0m. It can display the hand in between.

code snippets

It can also display the river of tiles.

code snippets 2

Displaying hand, draw, and discard. code snippets 3

There is no river mode in inline, so it's unnecessary.

More details, please refer to mahgen.

Nankiru Mode

New feature:

nankiru

The code is as follows:

Q001
东一局 西家 7巡目 0020000z
6778p1122345s77z||0p
A001
东一局 西家 7巡目 0020000z
6778p1122345s77z||0p
2s

Hand Size

In style.css, you can freely change the size of hands:

:root {
    --mahgen-base-height: 2.2em;    /* base height(for block) */
    --mahgen-inline-height: 1.8em;  /* inline hand, smaller for read */
    --mahgen-row-height: 2.2em;     /* river hand, usually same with base */
}

Furigana (Optional)

This plugin can also parse furigana syntax:

{漢字|かん|じ}
{日本語|にほんご}

Rendered output uses <ruby><rt>...</rt></ruby> in reading view and Live Preview. This furigana feature is independently implemented in this plugin, inspired by obsidian-markdown-furigana.

To avoid conflicts with dedicated furigana plugins, this feature is disabled by default. Enable it in plugin settings: Enable Furigana.

See THIRD_PARTY_NOTICES.md for attribution and reuse notes.

Known issues

  1. In the styles.css file, I used !important to ensure that the elements remain in the inline-block state because I believe that under no circumstances should these Mahjong tiles be rendered in a centered position.
  2. Rendering takes some time, so sometimes you can see original inline code like mg 1s. Click anywhere it will rerender.
78%
HealthExcellent
ReviewCaution
About
Render mahgen-format Mahjong hands, draws, discards and rivers directly inside Obsidian notes, supporting inline and block displays and Nankiru mode. Parse optional furigana syntax and render ruby readings in Live Preview and reading view.
VisualizationFormatsHTML
Details
Current version
1.0.10
Last updated
3 months ago
Created
Last year
Updates
5 releases
Downloads
241
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
Support
Author
michaelfw-uimichaelfw-ui
github.com/MichaelFW-ui
GitHubmichaelfw-ui
  1. Community
  2. Plugins
  3. Visualization
  4. Mahgen Renderer

Related plugins

Advanced Canvas

Supercharge your canvas experience. Create presentations, flowcharts and more.

Importer

Import data from Notion, Evernote, Apple Notes, Microsoft OneNote, Google Keep, Bear, Roam, and HTML files.

Excalidraw

Visual PKM powerhouse. Create and edit Excalidraw drawings.

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.

Maps

Adds a map layout to bases so you can display notes as an interactive map view.

Life Tracker

Capture and visualize the data that matters in your life.

Pandoc Plugin

Commands to export to Pandoc-supported formats like DOCX, ePub and PDF.

Strange New Worlds

Reveal networked thought and the strange new worlds created by your vault.

Charts

Easily create interactive charts in your notes.

Kroki

Render Kroki diagrams.