WYSIWYG editing Image gallery upload Content templates
Quick start guide

Getting Started

Add a full-featured WYSIWYG editor to your ASP.NET Core application in six steps.

1

Install the NuGet package

Add the RichTextBox package to your ASP.NET Core project using the .NET CLI or the Visual Studio NuGet Package Manager.

dotnet add package RichTextBox
2

Register services in Program.cs

Add the RichTextBox services and map the upload endpoints in your application startup.

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRichTextBox();
var app = builder.Build();
app.UseStaticFiles();
app.MapRichTextBoxUploads();
app.MapRazorPages();
app.Run();
3

Add Tag Helper import

Register the RichTextBox Tag Helper in your _ViewImports.cshtml file.

@addTagHelper *, RichTextBox
4

Place your license file

Copy RichTextBox.lic into your project's content root directory (the same folder as Program.cs). The package validates the license before rendering the editor.

MyProject/
  Program.cs
  RichTextBox.lic        <-- place here
  Pages/
  wwwroot/
5

Add the editor to a Razor Page

Use the <richtextbox> tag helper in any Razor Page or MVC View.

<form method="post">
    <richtextbox name="Body"
                 toolbar="full"
                 skin="gray"
                 height="400px" />
    <button type="submit">Submit</button>
</form>
6

Run your application

Build and run your project. The editor will render with the specified toolbar and skin.

dotnet run

Ready to explore more?

Browse the live demos to see every feature in action, or read the full class reference for detailed API documentation.