TabBlazor.Markdown 1.7.63-beta

This is a prerelease version of TabBlazor.Markdown.
dotnet add package TabBlazor.Markdown --version 1.7.63-beta
                    
NuGet\Install-Package TabBlazor.Markdown -Version 1.7.63-beta
                    
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="TabBlazor.Markdown" Version="1.7.63-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TabBlazor.Markdown" Version="1.7.63-beta" />
                    
Directory.Packages.props
<PackageReference Include="TabBlazor.Markdown" />
                    
Project file
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 TabBlazor.Markdown --version 1.7.63-beta
                    
#r "nuget: TabBlazor.Markdown, 1.7.63-beta"
                    
#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 TabBlazor.Markdown@1.7.63-beta
                    
#: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=TabBlazor.Markdown&version=1.7.63-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TabBlazor.Markdown&version=1.7.63-beta&prerelease
                    
Install as a Cake Tool

TabBlazor.Markdown

A Markdig renderer for the preview of TabBlazor's MarkdownEditor. The editor itself is in the TabBlazor package; without a renderer it works but has no preview.

builder.Services.AddTabBlazor();
builder.Services.AddTabBlazorMarkdown();
<MarkdownEditor @bind-Value="model.Description" Label="Description" Mode="MarkdownEditorMode.Split" />

The renderer is a plain IMarkdownRenderer, so it also renders saved markdown elsewhere:

@inject IMarkdownRenderer Markdown

<div class="markdown">@Markdown.Render(article.Body)</div>

Safe by default

Markdown typed by users ends up as HTML in other users' browsers, so the renderer:

  • shows raw HTML as text (<script> appears as typed instead of running);
  • lets links use only http, https and mailto, and images only http and https. Relative URLs are always allowed. Other links (such as javascript:) point to #, and other images have no source;
  • leaves out Markdig extensions that write raw attributes, such as generic attributes ({onclick=…}).

The pipeline is CommonMark plus pipe tables, task lists, strikethrough and automatic links.

Options

builder.Services.AddTabBlazorMarkdown(options =>
{
    options.SoftLineBreaksAsHardLineBreaks = true;          // line breaks like GitHub comments
    options.AllowedImageUrlSchemes.Add("data");             // images stored inline as data URLs
    options.ConfigurePipeline = pipeline => pipeline.UseFootnotes();
});

Raw HTML

To let raw HTML through, pass a sanitizer. The renderer runs it on the rendered HTML. For example, with the HtmlSanitizer package:

var sanitizer = new Ganss.Xss.HtmlSanitizer();
builder.Services.AddTabBlazorMarkdown(options => options.AllowHtml(sanitizer.Sanitize));

HtmlSanitizer is not a dependency of this package: it pulls in AngleSharp, which adds a lot to a WebAssembly download, and most apps do not need raw HTML.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.7.63-beta 45 11/9/2026