Add a full-featured WYSIWYG editor to your ASP.NET Core application in six steps.
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
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();
Register the RichTextBox Tag Helper in your _ViewImports.cshtml file.
@addTagHelper *, RichTextBox
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/
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>
Build and run your project. The editor will render with the specified toolbar and skin.
dotnet run
Browse the live demos to see every feature in action, or read the full class reference for detailed API documentation.