Editor Options Reference

Every option that controls editor behaviour at runtime is exposed through the IEditorOptions surface, implemented on the WPF editor by the UserOption object. Reach the live instance through the WpfHtmlEditor.UserOption property and assign individual flags either at startup or anywhere in your application code; changes apply immediately to the running editor.

This reference page documents the per-property surface: type, name, what it does, and the value the editor uses if you do not change it. For end-to-end task-oriented guides, see the other pages in the Programming category.

WPF HTML Editor UserOption fully expanded in the Visual Studio property grid showing every IEditorOptions member with its current value

using SpiceLogic.HtmlEditor.WPF;
using SpiceLogic.HtmlEditor.Abstractions;

// Configure several options in one place at window startup.
editor.UserOption.AutoDetectWordPaste                = true;
editor.UserOption.AutoResizeLargeImages              = true;
editor.UserOption.MaxPastedImageWidth                = 600;
editor.UserOption.EnterKeyResponse                   = EnterKeyResponses.Paragraph;
editor.UserOption.DefaultHtmlType                    = HtmlContentTypes.DocumentHtml;
editor.UserOption.ConvertAbsoluteUrlsToRelativeUrls  = true;

Paste behavior

bool AutoDetectWordPaste — Automatically detects when the clipboard payload is from MS Word, Outlook, OneNote, Excel or PowerPoint (2007 through current) and applies the same cleaning the toolbar's Paste from Word button performs. The user does not have to think about which paste button to use. Default: <true>.

bool MsIePasteBehavior — If true the editor falls back to the raw MS Internet Explorer paste path. The default behaviour exposes the pending HTML through the Pasting event so you can inspect or rewrite it; the IE path bypasses the event and pastes directly. Default: <false>.

Side by side comparison showing Word HTML before and after AutoDetectWordPaste cleans it on paste

URL handling

bool ConvertFileUrlsToLocalPaths — When true, URLs of the form file:///D:/My%20Folder/pic.jpg are rewritten to native paths like D:\My Folder\pic.jpg before they hit the saved HTML. Useful when you intend to copy the saved markup back to the file system. Default: <true>.

bool UrlEncodeHyperlinkHRefs — When true the editor URL-encodes the value the user types into the Hyperlink dialog before it is written to the href attribute, so spaces and other reserved characters survive a round trip through the browser. Default: <true>.

bool ConvertAbsoluteUrlsToRelativeUrls — If true, and the editor's BaseUrl

Last updated on May 12, 2026