RichTextBox 1.0.0
dotnet add package RichTextBox --version 1.0.0
NuGet\Install-Package RichTextBox -Version 1.0.0
<PackageReference Include="RichTextBox" Version="1.0.0" />
<PackageVersion Include="RichTextBox" Version="1.0.0" />
<PackageReference Include="RichTextBox" />
paket add RichTextBox --version 1.0.0
#r "nuget: RichTextBox, 1.0.0"
#:package RichTextBox@1.0.0
#addin nuget:?package=RichTextBox&version=1.0.0
#tool nuget:?package=RichTextBox&version=1.0.0
RichTextBox for ASP.NET Core
RichTextBox is an ASP.NET Core wrapper around the RichTextEditor client runtime.
It provides:
- a
richtextboxTag Helper for Razor Pages and MVC - bundled static web assets for the editor runtime
builder.Services.AddRichTextBox()for package setupapp.MapRichTextBoxUploads()for compatible upload and folder-aware image gallery endpoints- built-in AI demo endpoints for Ask AI, AI review persistence, and shared review activity
RichTextBox.licvalidation for packaged and deployed apps- opt-in autosave via
auto-save,auto-save-key, andauto-save-delay - context menu control via
enable-context-menuandcontext-menu-mode - dialog library configuration via
image-items-json,gallery-images-json, andhtml-templates-json - opt-in AI Toolkit via
enable-ai-toolkit - structured-content helpers via
enable-structured-content
Typical usage:
@addTagHelper *, RichTextBox
<form method="post">
<richtextbox asp-for="Body" toolbar="full" skin="gray" height="420px" />
</form>
Autosave example:
<richtextbox
asp-for="Body"
toolbar="full"
enable-context-menu="true"
context-menu-mode="Simple"
auto-save="true"
auto-save-key="draft:body"
auto-save-delay="600" />
Dialog library example:
@{
var imageItemsJson = System.Text.Json.JsonSerializer.Serialize(new[]
{
"/images/microsoft.svg",
"/images/Intel.svg"
});
var galleryImagesJson = System.Text.Json.JsonSerializer.Serialize(new object[]
{
new { url = "/images/microsoft.svg", text = "Microsoft logo" },
new { url = "/images/Intel.svg", text = "Intel logo" }
});
var htmlTemplatesJson = System.Text.Json.JsonSerializer.Serialize(new object[]
{
new object[] { "Newsletter", "<section><h2>Newsletter</h2><p>Start here.</p></section>" }
});
}
<richtextbox
asp-for="Body"
toolbar="full"
image-items-json="@imageItemsJson"
gallery-images-json="@galleryImagesJson"
html-templates-json="@htmlTemplatesJson" />
The three dialog configuration attributes expect JSON arrays.
AI Toolkit example:
<richtextbox
asp-for="Body"
toolbar="default"
enable-ai-toolkit="true"
ai-toolkit-persistence-key="article-review"
ai-toolkit-review-sync-interval="10000" />
Structured-content example:
<richtextbox
asp-for="Body"
toolbar="default"
enable-structured-content="true" />
app.MapRichTextBoxUploads() now exposes both:
- the upload endpoint used by the runtime uploader
- a gallery endpoint used by the insert image gallery dialog for folder browsing and folder creation
- an AI demo resolver endpoint used by the built-in AI Toolkit sample flow
- shared AI suggestion ledger and review-log endpoints for persistent AI review state
If you want the in-editor AI workflow to call your own backend instead of the demo resolver, register a custom IRichTextBoxAiResolver:
builder.Services.AddRichTextBox();
builder.Services.AddSingleton<IRichTextBoxAiResolver, MyAiResolver>();
public sealed class MyAiResolver : IRichTextBoxAiResolver
{
public ValueTask<RichTextBoxAiResponse> ResolveAsync(RichTextBoxAiRequest request, CancellationToken cancellationToken = default)
{
// Call your provider here and return the operation plan expected by the AI Toolkit plugin.
return ValueTask.FromResult(
RichTextBoxAiResponseBuilder.FromOperations(
request.HasSelection ? "Selection suggestion" : "Document suggestion",
RichTextBoxAiResponseBuilder.PreviewSuggestion(
"Provider-backed rewrite goes here.",
"Generated by a custom ASP.NET Core AI resolver.")));
}
}
You can also replace the default file-backed shared review persistence with your own stores:
builder.Services.AddRichTextBox();
builder.Services.AddSingleton<IRichTextBoxAiSuggestionLedgerStore, MySuggestionLedgerStore>();
builder.Services.AddSingleton<IRichTextBoxAiReviewLogStore, MyReviewLogStore>();
That lets you keep the built-in AI Review drawer and shared review sync while storing suggestion state in a database, cache, or external service.
Context menu presets:
DefaultSimpleMinimal
Bundled skins currently include:
graybluedarkoffice2007blue
License file placement for ASP.NET Core:
- place
RichTextBox.licin the app content root, besideProgram.csand your.csproj - the default lookup path is
RichTextBox.lic - the website demo project already copies that file to build and publish output
You can also override the default content-root-relative path:
builder.Services.AddRichTextBox(options =>
{
options.LicenseContentRootRelativePath = "licenses/RichTextBox.lic";
});
| 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. |
-
net8.0
- No dependencies.
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 | 128 | 4/22/2026 |
| 1.0.0-preview.5 | 62 | 4/7/2026 |
| 1.0.0-preview.4 | 49 | 4/7/2026 |
| 1.0.0-preview.3 | 47 | 4/7/2026 |
| 1.0.0-preview.2 | 66 | 4/7/2026 |
| 1.0.0-preview.1 | 52 | 4/7/2026 |