Rich text editor for ASP.NET MVC 5

Add an editor to a Razor view in your .NET Framework application. The sample routes image uploads to an MVC controller that reads HttpPostedFileBase and returns the stored image URL.

Run the sample locally

On Windows with IIS Express and the .NET SDK installed, extract the sample and the editor trial. From the sample folder, point the startup script at the directory containing rte.js.

.\run.ps1 -EditorPath "C:\path\to\richtexteditor"

Open http://localhost:5402/ and choose Insert Gallery to upload an image.

Connect the editor to your application

Open Views/Home/Index.cshtml in the sample. It loads the editor assets and upload adapter before initializing the gallery.

<div id="editor"></div>
<script>
    var editor = new RichTextEditor("#editor", {
        toolbar: "full",
        galleryEndpoint: "@Url.Content("~/rte/gallery")",
        maxUploadFileSize: 4000000   // same limit as the server
    });
</script>

Follow the upload walkthrough for the server code and configuration. A $129 domain license covers the purchased editor version and one year of updates.

Guides for MVC 5: uploads, gallery and files

Tested server code for each step, one problem per page.

All MVC 5 guides