Markdown
Render and edit markdown content using native MAUI controls — no WebView required. Includes a read-only MarkdownView renderer and a full MarkdownEditor with formatting toolbar and live preview. Uses Markdig for parsing with support for tables, task lists, and more.
| Viewer | Editor |
|---|---|
![]() | ![]() |
Add the XAML namespace:
xmlns:md="http://shiny.net/maui/markdown"MarkdownView
Section titled “MarkdownView”A read-only markdown renderer that converts markdown text to native MAUI controls.
<md:MarkdownView Markdown="{Binding DocumentContent}" Padding="16" />Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
Markdown | string | "" | Markdown content to render |
Theme | MarkdownTheme? | null | Rendering theme (auto Light/Dark if null) |
IsScrollEnabled | bool | true | Enable/disable scrolling |
Events
Section titled “Events”| Event | EventArgs | Description |
|---|---|---|
LinkTapped | LinkTappedEventArgs | Fired when a link is tapped |
Handle links in code-behind:
markdownView.LinkTapped += (sender, args) =>{ if (args.Url.StartsWith("internal://")) { // Handle internal navigation args.Handled = true; // Prevents default browser launch }};MarkdownEditor
Section titled “MarkdownEditor”A full editor with formatting toolbar, live preview toggle, and customizable toolbar items.
<md:MarkdownEditor Markdown="{Binding NoteContent, Mode=TwoWay}" Placeholder="Start writing markdown..." Padding="8" />Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
Markdown | string | "" | Markdown content (TwoWay) |
Theme | MarkdownTheme? | null | Preview theme (auto Light/Dark if null) |
Placeholder | string | "Write markdown here..." | Placeholder text |
ToolbarItems | IReadOnlyList<MarkdownToolbarItem>? | Default set | Formatting toolbar buttons |
IsPreviewVisible | bool | false | Toggle preview pane (TwoWay) |
ToolbarBackgroundColor | Color? | null | Toolbar background |
EditorBackgroundColor | Color? | null | Editor background |
Events
Section titled “Events”| Event | EventArgs | Description |
|---|---|---|
LinkTapped | LinkTappedEventArgs | Forwarded from preview link taps |
TextChanged | TextChangedEventArgs | Fired when editor text changes |
Toolbar Items
Section titled “Toolbar Items”The default toolbar includes: Bold, Italic, Inline Code, H1-H3, Bullet/Numbered/Task Lists, Link, Quote, and Code Block. Use MarkdownToolbarItems.All for all 15 items, or build a custom set:
editor.ToolbarItems = new[]{ MarkdownToolbarItems.Bold, MarkdownToolbarItems.Italic, MarkdownToolbarItems.Link, MarkdownToolbarItems.CodeBlock};MarkdownTheme
Section titled “MarkdownTheme”Comprehensive theming for rendered markdown. Auto-resolves Light/Dark based on Application.Current?.RequestedTheme when null.
// Use built-in themesmarkdownView.Theme = MarkdownTheme.Light;markdownView.Theme = MarkdownTheme.Dark;
// Or customizemarkdownView.Theme = new MarkdownTheme{ TextColor = Colors.Navy, LinkColor = Colors.Green, H1FontSize = 36, BlockSpacing = 16};Theme Properties
Section titled “Theme Properties”| Category | Properties |
|---|---|
| Colors | TextColor, MutedTextColor, LinkColor, CodeBackgroundColor, CodeTextColor, CodeBlockBackgroundColor, CodeBlockTextColor, BlockquoteBorderColor, BlockquoteBackgroundColor, HorizontalRuleColor, TableBorderColor, TableHeaderBackgroundColor |
| Font Sizes | BaseFontSize (16), H1FontSize (32), H2FontSize (24), H3FontSize (20), H4FontSize (18), H5FontSize (16), H6FontSize (14), CodeFontSize (14) |
| Spacing | BlockSpacing (12), ListIndent (24), CodeFontFamily |
Supported Markdown
Section titled “Supported Markdown”Bold, italic, strikethrough, H1-H6 headings, unordered/ordered/task lists, inline code, fenced code blocks, links (with LinkTapped event), images, blockquotes, tables, horizontal rules, and line breaks.
AI Skill
Section titled “AI Skill”Step 1 — Add the marketplace:
claude plugin marketplace add shinyorg/skills Step 2 — Install the plugin:
claude plugin install shiny-maui@shiny Coming soon — Copilot plugin install instructions will be added here.

