Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Markdown

A view that parses and renders markdown content as rich Vizia text/layout.

When To Use It

Use Markdown for inline documentation, help panels, release notes, and content-driven views where markdown authoring is preferred.

Feature Requirement

Markdown is compiled behind the markdown feature.

Constructing Markdown

use vizia::prelude::*;

let doc = r#"
Title

This is **bold** and this is *italic*.

- Item one
- Item two
"#;

Markdown::new(cx, doc);

Supported Content (Current Implementation)

The parser/renderer currently handles common nodes including:

  • Paragraphs and headings
  • Emphasis/strong/strikethrough
  • Bullet lists and list items
  • Inline code and code blocks
  • Links
  • Tables

Components and Styling

SelectorDescription
markdownRoot markdown container.
.pParagraph labels.
.h1.h6Heading levels.
.spanGeneric text spans.
.emphEmphasized text spans.
.strongStrong/bold text spans.
.strikethroughStrikethrough text spans.
.codeInline/block code text styling.
.linkLink text spans.
.tableTable container.
.table-rowTable row container.
.table-headersHeader row class.
.table-cellTable cell text container.
.liList item container.

Accessibility

  • Keep heading hierarchy meaningful (h1..h6 classes are exposed in styling).
  • Ensure link styling provides clear affordance and sufficient contrast.