Production-ready Markdown editor component wrapping EasyMDE with everything bundled — Mermaid diagrams, highlight.js syntax highlighting, callout blocks, video embeds, image upload, auto-save, and fully customisable toolbar. Drop into any Blazor Server or Hybrid app.
EnableMermaid="true". v11+ bundled.EnableHighlight="true". Choose your theme with HighlightTheme="github.min.css" (or any other).note, tip, warning, attention) rendered as colour-bordered callouts. Toolbar buttons insert the correct fence. Alerts can contain any Markdown.video fenced block auto-detects YouTube, Vimeo, and direct MP4/WebM URLs. Responsive iframe in the preview.Resize="vertical" / "horizontal" / "both" / "none". Default none.MinHeight="200px" MaxHeight="400px" keeps the footprint predictable.AutoSaveEnabled, AutoSaveId, AutoSaveDelay, customisable timestamp format).FullScreenZIndex.data-bs-theme.@bind-Value for source Markdown, ValueHTMLChanged callback for rendered HTML.CustomImageUpload callback (save to S3, CDN, local disk, anywhere). Drag-and-drop or paste from clipboard. Chunked upload with progress callbacks.<Toolbar> child content with <MarkdownToolbarButton> for built-in actions OR custom named buttons that fire CustomButtonClicked. Insert templates at cursor programmatically.insertTextAtCursor() JS interop — programmatically inject content from anywhere in your app.CustomButtonClicked, ValueChanged, ValueHTMLChanged, ImageUploadStarted/Progressed/Ended/Changed, ErrorCallback.Everything needed ships with the package — no CDN required:
EnableMermaid="true")EnableHighlight="true")github.min.css, atom-one-dark.min.css, monokai.min.css, etc.).nupkg) with symbols — published on nuget.org as PSC.Blazor.Components.MarkdownEditor 10.0.3.Demo Blazor Server project — unzip, dotnet run, see it live with example pages for Mermaid, Resize, Upload, Custom Toolbar, Insert LinkLICENCE.md (one developer perpetual, unlimited end users, no redistribution)1. Install the package
dotnet add package PSC.Blazor.Components.MarkdownEditor --version 10.0.3
2. Use in any Razor file — the package auto-injects its CSS/JS via _content/ when the component first renders:
@using PSC.Blazor.Components.MarkdownEditor
@using PSC.Blazor.Components.MarkdownEditor.Enums
<MarkdownEditor @bind-Value="myMarkdown"
Placeholder="Write something awesome…"
MinHeight="200px" MaxHeight="400px"
Resize="vertical"
EnableMermaid="true"
EnableHighlight="true"
HighlightTheme="github.min.css" />
@code {
string myMarkdown = "";
}
That's the whole integration. No DI registration, no manual asset links, no custom scripts.
<MarkdownEditor @bind-Value="body"
UploadImage="true"
CustomImageUpload="HandleImageUpload"
ImageMaxSize="@(10 * 1024 * 1024)" />
@code {
async Task<FileEntry> HandleImageUpload(MarkdownEditor editor, FileEntry file) {
// Save `file.Stream` wherever you want
var url = $"/uploads/{Guid.NewGuid()}{Path.GetExtension(file.Name)}";
// ... save to disk / S3 / CDN ...
file.Url = url;
return file;
}
}
<MarkdownEditor @bind-Value="body" EnableMermaid="true" EnableHighlight="true">
<Toolbar>
<MarkdownToolbarButton Action="MarkdownAction.Bold" />
<MarkdownToolbarButton Action="MarkdownAction.Italic" />
<MarkdownToolbarButton Action="MarkdownAction.Heading" Separator="true" />
<MarkdownToolbarButton Action="MarkdownAction.UnorderedList" />
<MarkdownToolbarButton Action="MarkdownAction.Link" Separator="true" />
<MarkdownToolbarButton Action="MarkdownAction.Preview" />
<MarkdownToolbarButton Action="MarkdownAction.SideBySide" />
</Toolbar>
</MarkdownEditor>
Omit <Toolbar> to get the full default toolbar including Mermaid, callouts (N/T/W/A), video, and syntax highlighting actions.
See the Wiki component — it includes MarkdownEditor plus a full documentation platform with pages, books, categories, versioning, visibility rules, short-URL image serving, and Markdown/Docsify export.