RichTextBox 1.0.0

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

RichTextBox for ASP.NET Core

RichTextBox is an ASP.NET Core wrapper around the RichTextEditor client runtime.

It provides:

  • a richtextbox Tag Helper for Razor Pages and MVC
  • bundled static web assets for the editor runtime
  • builder.Services.AddRichTextBox() for package setup
  • app.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.lic validation for packaged and deployed apps
  • opt-in autosave via auto-save, auto-save-key, and auto-save-delay
  • context menu control via enable-context-menu and context-menu-mode
  • dialog library configuration via image-items-json, gallery-images-json, and html-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:

  • Default
  • Simple
  • Minimal

Bundled skins currently include:

  • gray
  • blue
  • dark
  • office2007blue

License file placement for ASP.NET Core:

  • place RichTextBox.lic in the app content root, beside Program.cs and 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 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

    • 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