BlazorMarkdownEditor 1.0.0

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

BlazorMarkdownEditor

A lightweight, dependency-free Markdown editor component for Blazor — with Write and Preview tabs and a formatting toolbar, similar to the GitHub issue editor.

  • No third-party UI dependencies (no Telerik, MudBlazor, Bootstrap, …).
  • No external Markdown library — rendering is built in.
  • English defaults out of the box, fully localizable via parameters.
  • Safe preview: embedded HTML is encoded, so the preview cannot execute scripts.

Features

  • Tabs: Write (Markdown source) and Preview (rendered HTML).
  • Toolbar: headings, bold, italic, bulleted & numbered lists, links, tables.
  • Two-way binding of the raw Markdown source via @bind-Value.
  • Validation support inside EditForm (ValueExpression).

Installation

dotnet add package BlazorMarkdownEditor

No <script> or <link> tags are required — the JavaScript module and the component styles are served automatically as static web assets. (Make sure your app references the framework's scoped-CSS bundle, i.e. the <link href="<AppName>.styles.css" /> that Blazor projects include by default.)

Usage

@using BlazorMarkdownEditor

<MarkdownEditor @bind-Value="_text" Placeholder="Leave a comment" />

@code {
    private string _text = string.Empty;
}

Value always holds the raw Markdown source. Render it to HTML yourself when displaying it elsewhere:

string html = MarkdownConverter.ToHtml(_text);

Localization

All texts default to English and can be overridden through the Labels parameter — for example by wiring them up to your own translation system:

<MarkdownEditor @bind-Value="_text"
                Labels="@(new MarkdownEditorLabels
                {
                    WriteTab    = Translate("MARKDOWN_WRITE"),
                    PreviewTab  = Translate("MARKDOWN_PREVIEW"),
                    BoldTooltip = Translate("MARKDOWN_BOLD"),
                    // ...
                })" />

Parameters

Parameter Type Default Description
Value string "" The Markdown source (use with @bind-Value).
ValueChanged EventCallback<string> Raised when the source changes.
ValueExpression Expression<Func<…>> Set automatically inside an EditForm.
Labels MarkdownEditorLabels English User-facing texts; override to localize.
Placeholder string? null Placeholder for the empty textarea.
Rows int 10 Visible rows of the write area.
Readonly bool false Renders only the formatted preview — no tabs, toolbar or textarea.
Class string? null Extra CSS class(es) for the root element.

Supported Markdown

Headings (#######), **bold**, *italic*, blockquotes (>), inline code (`code`), fenced code blocks (```), horizontal rules (---), bulleted (-/*) and numbered (1.) lists, links [text](url) (safe schemes only), and pipe tables.

The toolbar provides: H1, H2, H3, bold, italic, quote, inline code, code block, bulleted list, numbered list, link and table.

Syntax highlighting

Fenced code blocks with a language are rendered with a language-xxx class and highlighted using a bundled copy of highlight.js — no extra setup required:

```sql
SELECT * FROM Users WHERE Active = 1;
```

highlight.js and the GitHub theme ship under wwwroot/highlight/ and are loaded on demand the first time a code block is shown. To use a different theme, override the .hljs styles in your app, or replace the bundled theme.

highlight.js is included under the BSD-3-Clause license — see wwwroot/highlight/LICENSE.

License

MIT © itree informatik GmbH

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.0.0 524 6/12/2026

Initial release: Write/Preview tabs, formatting toolbar (headings, bold, italic, lists, links, tables), dependency-free Markdown rendering.