THEMES
THEME SETTINGS

HTML Editor Overview

  • Cut (Ctrl+X)
  • Copy (Ctrl+C)
  • Paste (Ctrl+V)
  • Paste from Word
  • Undo (Ctrl+Z)
  • Redo (Ctrl+Y)
  • Remove Format
  • Superscript
  • Subscript
  • Ordered List
  • Bullet List
  • Indent
  • Outdent
  • Insert Link (Ctrl+K)
  • Remove Link (Ctrl+Shift+K)
  • Insert Image (Ctrl+G)
  • Insert Table
    v
  • Find and Replace (Ctrl+H)
  • Full Screen (F11)
  • v
  • v
  • Bold (Ctrl+B)
  • Italic (Ctrl+I)
  • Underline
  • Strikethrough
  • Align Left (Ctrl+L)
  • Align Center (Ctrl+E)
  • Align Right (Ctrl+R)
  • Back Color
    v
  • Fore Color
    v
About the HTML Editor

The DevExpress ASP.NET MVC HTML Editor is a rich-text WYSIWYG HTML editor extension. Its intuitive user interface enables even inexperienced users to edit HTML page content with ease.

Two simple steps to add a DevExpress HtmlEditor extension to your page are as follows:

1. Editing the View. First, you need to declare the HtmlEditor extension inside of the View. Specifically, you will create a Partial View because the extension provides AJAX callbacks by default, to give your end-users a better experience without updating the entire page. However, because ASP.NET MVC does not support callbacks, declare the HtmlEditor extension inside of a Partial View and define how the callbacks will be routed back to your controller using the CallbackRouteValues property:

Partial View code:

@Html.DevExpress().HtmlEditor(settings => {
    settings.Name = "htmlEditor";
    settings.CallbackRouteValues = new {
      Controller = "Overview", Action = "OverviewPartial"
    };
    settings.Html = "<div><strong>Blueberries</strong> are perennial flowering plants with indigo-colored berries in the section <em><strong>Cyanococcus</strong></em> within the genus <em><a href='http://en.wikipedia.org/wiki/Vaccinium' title='Vaccinium'>Vaccinium</a></em> (a genus that also includes cranberries and bilberries).</div>";
}).GetHtml()


2. Editing the Controller. Finally, the controller is where you'll need to define the action methods that will handle HtmlEditor's callbacks. The "OverviewPartial" action method below handles the callbacks. As you can see, the native DevExpress HtmlEditor extension follows the ASP.NET MVC pattern while still providing powerful features for your end-users.

Controller code:

public class HomeController: Controller {
  public ActionResult Index() {
    return View("Overview");
  }
  public ActionResult OverviewPartial() {
    return PartialView("OverviewPartial");
  }
}

Watch a short six-minute getting started video now to learn about the DevExpress HtmlEditor extension for ASP.NET MVC.

Key Features
  • Safe Markup Generation
    HtmlEditor automatically performs validation and is able to remove all potentially harmful code.
  • Paste Formatting
    HtmlEditor provides the capability to automatically format the pasted HTML content.
  • Insert Media Content
    Explorer-like tools help simplify the way in which end-users insert images, documents, flash, audio, video, and YouTube video files to editor content.
  • Built-in Image and Document Selectors
    Explorer-like tools help simplify the manner in which end-users insert images and documents.
  • Custom Dialogs
    HTML Editor offers you the capability to easily create custom dialogs and invoke them via toolbar items.
  • Import and Export
    With HTML Editor, you can import and export editor content from/to various document formats.
  • Rich Client-Side Functionality
    A comprehensive client-side API is available for HTML Editor. This functionality, coupled with the ability to handle a rich set of client events, dives you full control over the editor's behavior on the client side.
Version: v2016 vol 2.5
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at info@devexpress.com or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.