2.2.0
Decks 2.2.0 Release Notes
π§© Templates: render table rows your way
Decks 2.2.0 introduces table templates β design a card once, and every row of a tagged table renders
through it. Write the template in plain HTML/CSS or Markdown, drop placeholders like {{Word}} where the
column values should go, and bind it to your tables with a tag. Your vocabulary tables can become styled
furigana cards, your formula tables can render proper math, your data tables can look exactly how you want β
without touching the underlying notes.
Set a template folder under Settings β Templates, author a tagged template file, tag the heading above
a table, and you're done. See the Templates guide for a full walkthrough.
How it works
- One template, many rows. A single template binds to a whole table. Each row is merged into it
independently, so a 200-row table is 200 cards that all share one design. - Author with code blocks. A template file uses fenced blocks
decks-html-front,decks-html-back,
decks-html-notes(and thedecks-md-*variants) β pick HTML for full control or Markdown for
simple formatting, per card face. - Bind by tag. A template declares its tag (frontmatter
tags:or an inline#tagon its heading). Any
table whose heading carries that tag β or whose deck frontmatter carries it β renders through the
template. No tag match β the normal Front/Back/Notes columns are used, exactly as before. - Fill columns with placeholders.
{{ColumnName}}pulls the cell by header (case-insensitive), and
{{1}},{{2}}, β¦ pull by position. Unmatched placeholders simply resolve to nothing. - Sandboxed, theme-aware rendering. HTML faces render inside an isolated, sanitized Shadow DOM β
<style>is allowed,<script>and inline event handlers are stripped. Cards automatically match your
Obsidian light/dark theme, fonts, and colors, and update live when you switch themes. - A CSS layout API. Templates inherit a card frame by default (padding, centering, rounded
bounds) and can override it through CSS variables β:host { --padding: 0; --align: flex-start; --bg: #1e1e1e; }β for anything from comfortable reading cards to edge-to-edge custom designs. - Images just work. Obsidian embeds (
![[diagram.png]]), Markdown image links, and external image URLs
all render inside HTML templates, scaled to fit the card. - Per-column editing. Editing a template-bound card shows one labeled input per table column, so you
edit the data, not the markup.
Upgrading: existing decks are unaffected β templates are opt-in. Set a template folder to start using them.