Skip to content

Kit Callouts

Pavel edited this page Oct 21, 2026 · 6 revisions

English | Русский

Ready-made extensions for callouts and collapsible blocks in the syntax of Obsidian, MkDocs, Docusaurus, VuePress and HackMD. They come with the package, are off by default and are connected with one line each.

Callouts of Obsidian, MkDocs and Docusaurus

Connecting

The ready-made extensions live in the namespace Beresta.Markdown.Wpf.Kit.

MainWindow.xaml (xmlns:md="https://github.com/porohkun/Beresta.Markdown.Wpf" on the root element):

<md:MarkdownViewer Markdown="{Binding Text}">
    <md:MarkdownViewer.Extensions>
        <md:ObsidianCallouts />
        <md:MkDocsAdmonitions />
        <md:CalloutContainers />
    </md:MarkdownViewer.Extensions>
</md:MarkdownViewer>

MainWindow.xaml.cs, in the constructor (using Beresta.Markdown.Wpf.Kit;):

Viewer.Extensions.Add(new ObsidianCallouts());

Kinds

All three draw the same callouts. Besides the five GitHub kinds there are ten more, each with its own color, icon and title — the theme keys Md.Callout.<Kind>.Brush, .Icon and .Title, see Theming → Callout kinds. Letter case does not matter. Another name of a kind gets the look of that kind and keeps itself as the title.

Kind Other names
note —
tip hint
important —
warning attention
caution —
abstract summary, tldr
info —
todo —
success check, done
question help, faq
failure fail, missing
danger error
bug —
example —
quote cite

Any other kind is drawn as a note titled with its name. Obsidian treats important and caution as other names of tip and warning; here they keep their GitHub look.

Obsidian callouts

ObsidianCallouts adds to the GitHub syntax what Obsidian adds: a title after the kind, and - or + right after the kind for a callout that folds; - starts it folded. Callouts nest.

Any .md file:

> [!faq]- Why is the sky blue?
> Because of Rayleigh scattering.

> [!example] Nested
> > [!quote]
> > A callout inside a callout.

MkDocs admonitions

MkDocsAdmonitions reads !!! kind "Title" with the content indented by four spaces; ??? starts a folded collapsible admonition, ???+ an expanded one. The title is plain text; without it, the title of the kind is shown.

Any .md file:

!!! warning "Breaking change"
    `Render` is gone, use `Draw`.

??? tip "More"
    Hidden until expanded.

Containers :::kind

CalloutContainers reads the containers of Docusaurus, VuePress and HackMD: a known kind becomes a callout, details and spoiler become collapsible blocks. The title follows the name or goes into square brackets, as in Docusaurus 3; {state="open"} expands a HackMD spoiler at once. A container with any other name shows its content, as without the extension.

Any .md file:

:::tip Pro tip
Callouts cost nothing.
:::

:::details Click to expand
Hidden text.
:::

Folding in the source

By default whether a block is expanded lives in the viewer only. While controls edit the source — AreControlsEditable, see Ticking tasks — expanding and collapsing writes into the source the way the syntax marks it, the HTML <details> included:

Block Expanded Collapsed
<details> <details open> the open attribute is removed in any spelling: open, open="", open="open"
Obsidian callout > [!faq]+ > [!faq]-
MkDocs admonition ???+ tip ??? tip
container :::details, :::spoiler state="open" in the braces after the name: :::details {state="open"} Title the parameters with open are removed, and empty braces with them

The rest of the line stays as written: other attributes, the title, other parameters.

In the source of the editor

In the editor the lines of a callout get a bar in the color of its kind, Md.Callout.<Kind>.Brush, and the kind in the title line — [!note], the word after !!! or ::: — the same color. A kind without its own brush is drawn as note, as in the drawing.

Copy as Markdown

The callouts of all three extensions are copied in the Obsidian syntax — > [!KIND] with the fold mark and the title; collapsible blocks — as <details> with <summary>.

Beresta.Markdown.Wpf

Basics

Working with Text

Appearance

Integration

Editing

Your Own Syntax

Ready-made Extensions


По-русски

Основы

Работа с текстом

Оформление

Встраивание в приложение

Правка

Свой синтаксис

Готовые расширения

Clone this wiki locally