Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Markdown

Since 0.1.0-alpha.22
Shows Markdown as HTML, sanitized and styled as Prose.

Shows Markdown, such as release notes or a chat reply: turned into HTML on the server, sanitized, then styled as Prose.

Release notes

Set Text to the Markdown. It's CommonMark, with GitHub's tables, task lists, strikethrough and links from bare URLs. Under the page's own title, set TopHeading to 2.

Static

Preview

Version 2.4

Invoices can now be paid in any currency your account accepts. See the currency guide for the list.

Changes

AreaChangeTicket
BillingRefunds round to the cent1182
ExportsCSV files open in Excel without a prompt1207
SearchBeta Available to everyone1213

Before you upgrade

  • Back up the invoices table
  • Set Billing:Currencies in appsettings.json:
{ "Billing": { "Currencies": ["USD", "EUR", "GBP"] } }

Questions? Write to [email protected].

Code

Usage.razor
@* A changelog entry kept in Markdown, as a repository's release notes are. *@
<Markdown Text="@notes" TopHeading="2" MaxWidth="Length.Prose" Grow />

Add this example to a page with the izzy CLI:

bash
izzy add component Markdown --at <file>:<line>

The Markdown becomes HTML on the server and is sanitized as RichText sanitizes HTML, so HTML written in it can't run script. A fenced code block's language is highlighted.

To turn Markdown into safe HTML yourself, call RichTextMarkdown.ToHtml.

Details

RichTextMarkdown reads Text as CommonMark, with GitHub's tables, task lists, strikethrough and links from bare URLs, and RichTextSanitizer cleans the result, so HTML written in the Markdown can't run script on the page. A fenced code block with a language is highlighted on the server, as Code is. For saved HTML, use RichText.

Mode support

What works in each mode, Markdown
FeatureStaticInteractive
EverythingYesYes

Static: static server-side rendering, with no circuit and no WebAssembly. Interactive: Server, WebAssembly or Auto.

Accessibility

  • Heading levels, alt text and link text come from the Markdown. When the page has its own heading 1 above the text, set TopHeading to 2 so the text's headings sit under it.
  • Links are underlined, not marked by color alone.

Parameters

Markdown parameters
PropTypeDefault
TextThe Markdown to show.string?
TopHeadingThe highest heading level shown, 1 to 6: higher headings move down to it.int1
AllowDataImagesKeep images whose source is a data: URL of a PNG, JPEG, GIF, WebP or AVIF image.boolfalse
SizeText size.ProseSizeProseSize.Md
AsThe element to render: div on a Box; components built on it set their own (List a ul, Section a section).string"div"
ChildContentThe content.RenderFragment?

See also

  • RichText: displays HTML from an editor or a CMS safely in the page.
  • RichTextMarkdown

Connection lost

Rejoining the server…