Properties

The HTML Editor control's most important properties are BodyHtml and DocumentHtml; they are already explained in this section.
The next most important property is Options, which is a container exposing dozens of sub-properties that control editor behaviour (paste handling, DOCTYPE selection, image resizing, tag-navigator behaviour, table editing, etc.). For the full list, see the Editor Options reference; a few of the most commonly used sub-properties are AutoDetectWordPaste, EnterKeyResponse, and MaxPastedImageWidth.


All sub-property names are self explanatory. If you select a property in the Visual Studio Properties window you will see its description in the description pane:


Commonly used top-level properties

The remaining properties below are exposed directly on the editor control (not inside Options):
public string BaseUrl { get; set; } : Gets or sets the Base URL of the document so relative paths can be used for images and local hyperlink files.
public string BodyStyle { get; set; } : Gets or sets the value of the style attribute on the <body> element.
public string Charset { get; set; } : Gets or sets the charset for the document.
public string DefaultFontFamily { get; set; } : Gets or sets the default font family for the document. This value is persisted in the style attribute of the body element, so setting it also updates BodyStyle.
public int DefaultFontSizeInPt { get; set; } : Gets or sets the default font size in pt. This value is persisted in the style attribute of the body element, so setting it also updates BodyStyle.
public string DocumentCSSFilePath { get; set; } : Gets or sets the full path to an external CSS file that you want to link to your editing HTML document.
public bool ShowZeroBorderGuideline { get; set; } : Enables or disables the guideline overlay for zero-border tables at design time.
public EditorLanguage Language { get; set; } : Gets or sets the UI language used by the editor (toolbar tooltips, dialogs, context menus). The editor ships with several built-in language packs.
public KeyBindingsManager KeyBindings { get; } : Read-only accessor for the keyboard shortcut manager. Use it to inspect, override, or disable individual editor keyboard shortcuts at runtime.
public EditorModes EditorMode { get; set; } : Gets or sets the active editor mode. Supported values include WysiwygDesign, HtmlEdit, and ReadOnlyPreview.
public SpellCheckerOption SpellCheckOptions { get; set; } : Gets or sets the spell-checker configuration object — spell-check language, whether to fire inline spell checking on key stroke, ignored words list, and related settings.
public ContextMenuStrip EditorContextMenuStrip { get; set; } : Gets or sets a custom ContextMenuStrip to be shown when the user right-clicks inside the editor. Leave it null to use the built-in context menu (which respects Options.ShowDefaultContextMenu and Options.DoNotShowContextMenuInPreviewMode).
For the complete API reference, please check the class library reference document (*.chm file) that ships in the download zip file.