$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
HtmlEditor Feature Edit Modes in ASP.NET
Home > How to > HtmlEditor Edit Modes

Information to Edit Modes of Html Editor

Similar to other advanced text editing applications, the PerHtmlEditor Control also offers developers with three commonly used editing modes, which are Design, Html and Preview. With these three editing modes, users can easily switch to certain edit mode for achieving specific editing purpose.
In this guiding page, we will not only introduce the different functions of these three editing modes, but also offer sample programming codes to illustrate how to change the editing mode in ASP.NET web application.

Introduction to Three Editing Modes

Now we will briefly illustrate the functions of these three editing modes respectively.
  • Design: in this mode, users can use the buttons, drop-downs and dialogs of different tools that are placed in the toolbar of the html editor for text editing and text formatting purposes. Here we attach an image to show you how the html editor looks like when it is in Design mode.
  • Html: in this mode, users are able to edit the content text by modifying the html code directly. And this mode is often used by some advanced users. Similarly, the image below is used to display how the html editor looks like when it is in Html mode.
  • Preview: this Preview mode is used to demonstrate how the content will look. In real life application, to prevent some unnecessary mistakes, we need to examine the web page before updating. And this preview mode is mainly used to demonstrate how the web page will look like after it is published. This is a screen shot when the html editor is in the Preview mode.
Note: these three editing modes of the html editor can be freely switched.

How to Change Edit Mode Programmatically

In this section, we will show you how to change the editing mode of the html editor using programming code.

How to change edit mode in aspx web page

<kettic:PerHtmlEditor ID="PerHtmlEditor1" runat="server" EditModes="All">
</kettic:PerHtmlEditor>
<kettic:PerHtmlEditor ID="PerHtmlEditor1" runat="server" EditModes="Design,Html,Preview">
</kettic:PerHtmlEditor>

How to change edit mode using C# code

PerHtmlEditor1.EditModes = EditModes.Design | EditModes.Html | EditModes.Preview;

Other Feature Tutorials for the HtmlEditor

ASP.NET AJAX UI Controls