Version

WebHtmlEditor Class

Replaces the TextBox control to provide advanced HTML editing within a browser.
Syntax
Remarks

The WebHtmlEditor control provides advanced HTML editing. The WebHtmlEditor control uses the MS DHTML engine to enable WYSIWYG-style editing within a browser. The WebHtmlEditor control renders an IFRAME, associated tables to provide an "editor" interface, and the necessary JavaScript to perform the editing actions.

Basic Configuration

Once a project is created, the WebHtmlEditor is provided with default display settings (for more information, see the WebHtmlEditor constructor topic). This default configuration can be modified one of two ways:

Using the Properties Builder. Open the properties builder by right-clicking the WebHtmlEditor in the designer and choosing "Properties". This opens a configuration application which can be used to customize the look and configuration of the WebHtmlEditor.Using Code. Within code (such as in your code-behind page) the editor can easily be configured by setting properties and calling methods. For example, easily create a toolbar configuration by using the WebHtmlEditor.Clear method to clear the existing configuration and the WebHtmlEditor.AddToolbarItem to quickly add new items to the toolbar. Look and feel of the editor can be easily customized as well. For example, to set the styles of all buttons, set the properties of the WebHtmlEditor.ButtonStyles object.

For more information about configuration, see the topic Configuring the Editor.

Advanced Customization

The WebHtmlEditor allows highly advanced customization, enabling a developer to create complex client-side objects such as custom windows-style dfialog boxes with only a few lines of code. For more information about this see the topic Advanced Customization.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also