LiveMarkdown 1.1.2
dotnet add package LiveMarkdown --version 1.1.2
NuGet\Install-Package LiveMarkdown -Version 1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LiveMarkdown" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiveMarkdown" Version="1.1.2" />
<PackageReference Include="LiveMarkdown" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LiveMarkdown --version 1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LiveMarkdown, 1.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LiveMarkdown@1.1.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LiveMarkdown&version=1.1.2
#tool nuget:?package=LiveMarkdown&version=1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LiveMarkdown
A lightweight Avalonia control for rendering Markdown in .NET 8 applications. LiveMarkdown focuses on high-quality visual rendering, streaming/incremental preview scenarios and consistent theming (including LaTeX formula color enforcement).
Supported features
- Markdown parsing via Markdig with advanced extensions enabled:
- Headings (H1�H6)
- Paragraphs
- Ordered and unordered lists (with nesting)
- Task lists (? / ?)
- Tables (pipe tables)
- Blockquotes
- Horizontal rules
- Links and images
- Emoji support
- Fenced code blocks with syntax highlighting using AvaloniaEdit (common languages supported such as C#, JavaScript, Python, XML)
- Inline code rendering (monospace)
- Mermaid diagrams: render
fencedcode block with languagemermaidas an inline diagram - LaTeX / math support via AvaloniaMath:
- Inline math (
$...$) - Block math (
$$...$$) - FormulaBlock rendering for inline and block math
- Inline math (
- Incremental / streaming rendering:
- Detects simple appends to existing content and re-renders only the tail
- Optimized for live preview and streaming scenarios
- Temporary highlighting of the last incoming chunk during streaming
- Styling and theming:
- CSS-like classes and styles in
Generic.axaml(e.g..md-heading,.md-paragraph,.md-code-block,.md-quote,.md-list,.md-table) - Control enforces its own Foreground on generated elements to ensure consistent colors across themes
- CSS-like classes and styles in
- Public API surface (high level):
Text(string) � Markdown content to renderContentForeground/ aliasForeground(IBrush) � color for already-rendered contentLiveContentForeground/ aliasLiveForeground(IBrush) � color for the currently incoming chunk
Quick usage (XAML)
xmlns:lm="clr-namespace:LiveMarkdown.Controls;assembly=LiveMarkdown"
<lm:MarkdownView Text="{Binding MarkdownText}"
Foreground="White"
LiveForeground="#a94dc1" />
<lm:MarkdownView Text="{Binding LiveMarkdownText}"
Foreground="{StaticResource BrushTextPrimary}"
LiveForeground="{StaticResource ButtonBorderBrush}" />
Dependencies
- .NET 8 (net8.0)
- Avalonia UI 11.3.x
- Markdig
- AvaloniaEdit (code block rendering & highlighting)
- AvaloniaMath (LaTeX rendering)
Exact package versions are listed in LiveMarkdown.csproj.
Build & integration
- Install .NET 8 SDK.
dotnet restoredotnet build- Add project reference or NuGet package to your Avalonia app.
- Include control styles in App resources:
<StyleInclude Source="avares://LiveMarkdown/Themes/Generic.axaml" />
- Use the control in XAML:
<lm:MarkdownView Text="{Binding MarkdownText}" />
License
LiveMarkdown is licensed under the Apache License 2.0. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Avalonia (>= 11.3.9)
- Avalonia.AvaloniaEdit (>= 11.3.0)
- AvaloniaMath (>= 2.1.0)
- Markdig (>= 0.44.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.