The following guide shows the steps to implement a RichTextEditor Control into ASP.NET MVC applications. If you haven't downloaded the software, please download it from here.

1. Install the assembly

Copy the following files to your application bin folder.

The "richtexteditor" folder and all files it contains should be deployed to the application directory of your MVC website.

2. Add Uploader httpModule to web.config's httpModules list

To allow RichTextEditor to upload big files, you need to add Uploader HttpModule to your application.

IIS 5.0, 6.0 and IIS 7.0 Classic mode

CopyCode imageCopy Code
<configuration>
  <system.web>
    <httpModules>
      <add name="UploadModule" type="RTE.UploadModule,RichTextEditor"/>
     </httpModules>
  </system.web>
</configuration>

IIS 7.0 Integrated mode

CopyCode imageCopy Code
<configuration>
  <system.webServer>
    <modules>
      <add name="UploadModule" type="RTE.UploadModule,RichTextEditor"/>
    </modules>
  </system.webServer>
</configuration>

3. Using RTE in a MVC page (.cshtml)

a. Register RichTextEditor control in MVC controller and use Editor.LoadFormData method to load content into the RTE

Editor Editor1 = new Editor(System.Web.HttpContext.Current, "Editor1");
Editor1.LoadFormData("Type Here...");
Editor1.MvcInit();
ViewBag.Editor = Editor1.MvcGetString();

b. Insert a RTE instance into the page

@Html.Raw(ViewBag.Editor)


Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.