No description
  • TypeScript 77.6%
  • CSS 20.2%
  • JavaScript 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-02 15:54:07 -07:00
.github Initial commit 2026-08-01 13:13:32 -07:00
docs feat/twocolumn: add two column layout and narrower style 2026-09-02 14:38:54 -07:00
examples chore: update to CORRECTLY-THEMED preview :wesmart: 2026-09-02 15:53:08 -07:00
src feat/twocolumn: styling (mostly) at parity with web app 2026-09-02 15:35:32 -07:00
.gitignore chore: initialize obsidian plugin 2026-08-01 13:24:25 -07:00
CONTRIBUTING.md Initial commit 2026-08-01 13:13:32 -07:00
esbuild.config.mjs chore: initialize obsidian plugin 2026-08-01 13:24:25 -07:00
LICENSE.md Initial commit 2026-08-01 13:13:32 -07:00
manifest.json chore: initialize obsidian plugin 2026-08-01 13:24:25 -07:00
package.json chore: update package.json 2026-08-01 18:16:51 -07:00
README.md feat/twocolumn: add two column layout and narrower style 2026-09-02 14:38:54 -07:00
styles.css feat/twocolumn: styling (mostly) at parity with web app 2026-09-02 15:35:32 -07:00
tsconfig.json chore: initialize obsidian plugin 2026-08-01 13:24:25 -07:00
version-bump.mjs chore: initialize obsidian plugin 2026-08-01 13:24:25 -07:00
versions.json chore: initialize obsidian plugin 2026-08-01 13:24:25 -07:00

Obsidian Stat Blocks

An Obsidian plugin for creating D&D 5e/5.5e stat blocks from TOML.

Rendered Ancient Red Dragon stat block

Overview

Write a fenced monster code block in an Obsidian Markdown note. In Live Preview, it renders as a themed stat block when the cursor is outside the block and becomes editable TOML when the cursor enters it. Reading view always shows the rendered stat block.

Start with the usage guide, then see the format token reference, preset reference, or the Ancient Red Dragon and Lich examples.

Quickstart

bun install
bun run dev     # watch build with inline sourcemaps
# or
bun run build   # typecheck and production bundle

Copy main.js, manifest.json, and styles.css into <vault>/.obsidian/plugins/obsidian-stat-blocks/, enable Stat Blocks under Settings → Community plugins, and reload Obsidian after rebuilding.

Features

  • TOML-backed monster code blocks.
  • Live Preview rendering with cursor-based source editing.
  • TOML syntax highlighting while editing.
  • Calculated ability modifiers, attack bonuses, save DCs, damage averages, hit points, proficiency bonuses, and XP.
  • Traits, actions, bonus actions, reactions, legendary actions, villain actions, and mythic actions.
  • Markdown rendering inside stat block text, including wiki links, hyperlinks, emphasis, and other formatting.
  • Theme-aware styling using Obsidian CSS variables.
  • Optional responsive two-panel stat blocks with two_column = true.

Project Stack

  • TypeScript
  • Obsidian 1.5+
  • smol-toml
  • CodeMirror 6 and @codemirror/legacy-modes
  • esbuild
  • Bun