Skip to content

Kit Text

Pavel edited this page Oct 21, 2026 · 9 revisions

English | Русский

Ready-made extensions for the look and the review of text: chips, color codes, CriticMarkup, hidden comments, spoilers, task statuses and footnotes as tooltips. Off by default, connected one line each (xmlns:md="https://github.com/porohkun/Beresta.Markdown.Wpf"), like the callouts.

Chips, a color code, review marks, a spoiler and task statuses

MainWindow.xaml:

<md:MarkdownViewer Markdown="{Binding Text}">
    <md:MarkdownViewer.Extensions>
        <md:Chips />
        <md:ColorChips />
        <md:CriticMarkup />
        <md:Comments />
        <md:Spoilers />
        <md:TaskStatuses />
        <md:FootnoteTips />
    </md:MarkdownViewer.Extensions>
</md:MarkdownViewer>

Chips

Chips: ::text:: is a chip, ::text::{.kind} a chip of a kind — info, success, warning or danger; any other kind is a plain chip. A chip is styled text: selected by letters, found by search.

Any .md file:

Status: ::done::{.success}, ::blocked::{.danger}, ::draft::.

Color codes

ColorChips: inline code that is a whole color — #RGB, #RRGGBB, #RRGGBBAA, rgb(), rgba(), hsl(), hsla() — gets a circle of that color next to it.

Any .md file:

The accent is `#0969DA`, the hover is `rgba(9, 105, 218, 0.8)`.

CriticMarkup

CriticMarkup draws review marks as styled text: {++inserted++}, {--deleted--}, {~~old~>new~~}, {==highlighted==}; {>>comment<<} is an icon with the comment in a tooltip.

Any .md file:

The draft was {~~rough~>polished~~}{>>ask the editor<<} and {++checked++}.

Comments

Comments: %%comment%% inside a line and a block between %% lines are not drawn.

Any .md file:

Visible text %%and a hidden note%%.

%%
A hidden block
of several lines.
%%

Spoilers

Spoilers: ||text|| is painted over until it is clicked; the click opens and closes it again, and an opened spoiler stays open while the text changes. In a table row | divides the cells, so there is no spoiler there.

Task statuses

TaskStatuses: - [/] in progress, - [-] cancelled, - [>] moved, - [?] in question, - [!] important — a sign in the same box as a task has, in its color Md.Task.Brush; Task.Status is the status character. While controls edit the source, a click writes the next status in this order and then the first one again — see Ticking tasks.

Footnotes as tooltips

FootnoteTips: a footnote reference shows the footnote in a tooltip, and the definition is not drawn where it is written.

In the source of the editor

In the editor chips, review marks and spoilers are drawn with their Span styles: the background, the color and the line of the drawing; their frames — ::, {++ and ++}, || and the others — are markup, a comment {>>…<<} is markup as a whole. A spoiler is not covered in the source.

Look

Key What it is
Md.Chip.Style, Md.Chip.Info.Style, Md.Chip.Success.Style, Md.Chip.Warning.Style, Md.Chip.Danger.Style Span styles of chips: the background Md.Chip.Background, an info chip with the background of a mention Md.Mention.Background, success, warning and danger with Md.Chip.Success.Background, .Warning.Background, .Danger.Background; the text in the color of the callout of the same kind Md.Callout.<Kind>.Brush
Md.ColorCode.Template the template of a color code; Md.ColorCode.SwatchSize, .SwatchMargin, .SwatchBorder, .SwatchBorderThickness
Md.Critic.Insertion.Style, Md.Critic.Deletion.Style, Md.Critic.Highlight.Style Span styles of review marks: an insertion and a deletion in the colors of added and removed marks Md.Mark.Added.LineBrush and Md.Mark.Removed.LineBrush, a highlight with the background of a marker Md.Marked.Background
Md.Critic.Comment.Template the comment icon Md.Critic.CommentIcon like a comment mark: the color Md.Mark.Comment.LineBrush, the size Md.Mark.IconSize; Md.Critic.CommentPadding
Md.Spoiler.Style Span style of a spoiler; Md.Spoiler.Cover, a revealed spoiler — with the background of a chip Md.Chip.Background
Md.TaskStatus.Template a task with a status; the signs Md.TaskStatus.InProgress.Icon, .Cancelled.Icon, .Forwarded.Icon, .Question.Icon, .Important.Icon in a 16 by 16 box
Md.FootnoteTip.Template a footnote reference with a tooltip; Md.FootnoteTip.MaxWidth

«Copy as Markdown» writes chips, review marks, spoilers and task statuses back in their own syntax.

Beresta.Markdown.Wpf

Basics

Working with Text

Appearance

Integration

Editing

Your Own Syntax

Ready-made Extensions


По-русски

Основы

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

Оформление

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

Правка

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

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

Clone this wiki locally