WPF HTML Editor Control

A native-XAML HTML editor for WPF apps - one NuGet install, clean XHTML, Word paste that survives, source code if you need it. In production since 2015, ready for .NET 10.

Download free trial

C# and VB.NET samples · 14-day evaluation

Book a live demo

Free, 1:1 with a domain expert

Install via NuGet
$ dotnet add package SpiceLogic.HtmlEditor.WPF PM> Install-Package SpiceLogic.HtmlEditor.WPF
Works with
.NET Framework: 4.5, 4.7.2, 4.8 .NET: 5, 6, 7, 8, 9, 10 Visual Studio: 2019, 2022, 2026
3.9Kdownloads on NuGet Since 2015in production Perpetual licensepay once · no subscription

An editor your users never have to think about.

It pastes cleanly from Word, produces clean XHTML, and behaves like it belongs in your app.

Quick start

Add a full HTML editor to your WPF app in minutes.

One paste. Your assistant connects itself to our documentation server, installs the package, and writes the integration against the real API.

Paste this into Claude Code, Cursor, or Copilot in agent mode
First connect yourself to the SpiceLogic documentation server so you work from the real API instead of memory. In Claude Code run: claude mcp add --transport http spicelogic-wpf-editor https://mcp.spicelogic.com/html-editor/wpf . In VS Code or Cursor, create .vscode/mcp.json with an http server named spicelogic-wpf-editor pointing at https://mcp.spicelogic.com/html-editor/wpf and start it. Then check that the SpiceLogic tools actually respond. If they do not, tell me to restart the session and stop there rather than writing code from memory.

Once the tools respond, add a WYSIWYG HTML editor to my WPF app: install the SpiceLogic.HtmlEditor.WPF NuGet package, host the editor in the main window so it fills the window, bind its HTML two way to a view model property, add a Save button that writes the HTML to a file, then build and run it.

The connection is a one-time step and the assistant does it itself. To wire it up by hand instead, see setup for Claude Code, Cursor, Copilot and Claude Desktop.

Or write it yourself: XAML binding or code-behind, both work. MVVM two-way binding included.

XAML
<wpfHtmlEditor:WpfHtmlEditor x:Name="HtmlEditor1" Margin="10" />
<!-- MVVM two-way binding -->
<wpfHtmlEditor:WpfHtmlEditor
    BodyHtml="{Binding MyHtmlContent, Mode=TwoWay}"
    />
C#
public MainWindow()
{
    InitializeComponent();
    HtmlEditor1.BodyHtml = "<p>Hello <strong>World</strong>!</p>";
}
private void SaveDocument()
{
    string html = HtmlEditor1.DocumentHtml;
    File.WriteAllText("output.html", html);
}
The work · 20 capabilities

20 capabilities. Three are shown in full; the rest open in place.

01

Ship a Full HTML Editor Without Building One

Drop WpfHtmlEditor into a XAML window and your app gains a complete HTML composition surface: toolbar, WYSIWYG editing, formatted source view, preview mode, spell checking, tables, images, and dialogs - the plumbing a team otherwise spends weeks building before the first real feature ships.

It is built for WPF - XAML toolbar, vector icons, ResourceDictionary theming, bindable HTML properties - not a WinForms editor wrapped in WindowsFormsHost. SpiceLogic has shipped HTML editing controls since 2007, and the current line is rebuilt for modern .NET through .NET 10.

WPF window hosting the HTML editor with toolbar, WYSIWYG business document, account fields, and send action
02

Paste From Word and Outlook Without the Mess

Your users will paste from Word and Outlook - the only question is what your database receives. The editor detects Office clipboard content and cleans it automatically: no MsoNormal noise in saved templates, email bodies, or support replies, and no special button for users to remember.

Need stricter rules? The Pasting event is a checkpoint where your own policy runs before anything enters the document.

Word document beside the WPF HTML editor showing the same content pasted clean
03

Clean HTML Your Database and Email Can Trust

One screen saves a fragment into a SQL column; another sends a complete document by email. BodyHtml returns the inner body markup, DocumentHtml the full document with head and doctype - both clean, both ready to store or send, no DOM scraping.

HTML5 output is the default, with overrides available for older render targets.

WPF editor showing a document with its BodyHtml and DocumentHtml output beneath it
The complete index
04 Binds Like Any Other WPF Control Your ViewModels should not care that HTML is involved.

Your ViewModels should not care that HTML is involved. BodyHtml, DocumentHtml, and DocumentTitle are real dependency properties that bind two-way by default: BodyHtml="{Binding Draft.Body}" loads the document from your ViewModel and flows edits back as the user types, with UpdateSourceTrigger under your control. The editor drops into an MVVM codebase the way a TextBox does.

XAML binding markup in the code editor beside the running WPF app showing the bound HTML document
05 Let Users Build Their Own Mail-Merge Templates Templates need fields, not fragile hand-typed tokens.

Templates need fields, not fragile hand-typed tokens. The mail-merge API lets your application define placeholders - customer name, invoice number, renewal date - that users insert at the caret and your code resolves at send time. It turns the editor into a template builder for CRM messages, invoices, and notification emails.

Mail-merge placeholders inserted into an email template in the WPF HTML editor
06 Where AI Drafts Get Human Approval Much of the HTML inside business apps now starts as an AI draft - support replies, CRM messages, templates.

Much of the HTML inside business apps now starts as an AI draft - support replies, CRM messages, templates. The editor is the review surface where a person refines that draft before it ships: load AI output through BodyHtml, let users edit it visually, and let the Pasting event and clean-HTML pipeline keep machine-generated markup within your rules.

A support desk WPF app where a person reviews an AI-drafted reply in the SpiceLogic HTML editor before approving and sending
07 Your AI Already Knows This Control Most of an evaluation is spent teaching an assistant an API it has never seen, then deleting the code it invented.

Most of an evaluation is spent teaching an assistant an API it has never seen, then deleting the code it invented. SpiceLogic publishes an official Model Context Protocol server for this control, among the first from a .NET UI vendor, so Claude Code, Cursor, and VS Code Copilot read the real signatures, the real documentation pages, and snippets that compile today.

Connect it once with claude mcp add --transport http spicelogic-wpf-editor https://mcp.spicelogic.com/html-editor/wpf, then describe what you want built and let the assistant write it. The endpoint is scoped to WPF, so a WPF question can never be answered with WinForms's API.

Read the walkthrough
08 Spell Check Without Deployment Drama Fourteen Hunspell dictionaries are embedded in the control - English (US and GB), German, French, Spanish, Italian, Dutch, Danish, Swedish,…

Fourteen Hunspell dictionaries are embedded in the control - English (US and GB), German, French, Spanish, Italian, Dutch, Danish, Swedish, Norwegian, Polish, Czech, and Portuguese (Brazil and Portugal) - so there are no dictionary files to ship. Inline red squiggles, dialog checking, and a per-user custom dictionary work out of the box; any OpenOffice dictionary or your own engine plugs in through ISpellCheckerEngine.

Misspelled words underlined in the WPF HTML editor with spelling suggestions shown
09 Tables Users Can Edit Without Calling Support Most simple editors lose track of a table the moment it exists - users end up deleting and starting over.

Most simple editors lose track of a table the moment it exists - users end up deleting and starting over. The two-way table dialog reads the existing structure and styling back from the document, so rows, columns, borders, and merged cells stay editable forever. Content.TableAuthoringService exposes the same operations to your own code.

WPF table properties dialog populated from an existing table in the document
10 Images That Arrive Clean and Never Break the Layout Screenshots in tickets, logos in signatures, product shots in templates - images arrive from files, URLs, and the clipboard.

Screenshots in tickets, logos in signatures, product shots in templates - images arrive from files, URLs, and the clipboard. Oversized pastes are resized automatically with MaxPastedImageWidth, and EmbedLocalImagesAsBase64() turns local references into portable, self-contained HTML when output leaves the machine.

WPF image dialog open over a document with an inserted image
11 Drive the Whole Editor from Your Own Code Everything the toolbar does, your code can do.

Everything the toolbar does, your code can do. Focused services keep the API discoverable:

  • Content - read, set, transform, and export HTML
  • Formatting and Selection - apply styles and inspect what the user selected
  • StateQuery - drive your own UI state: bold, undoable, inside a table
  • HtmlChanged - dirty flags, save prompts, live previews
  • GetEmailMessageWithLocalImagesEmbedded() - a mail-ready message in one call
C# code driving the WPF HTML editor's Content, Formatting, and StateQuery services
12 Toolbar Icons That Stay Sharp at Every DPI WPF buyers notice when a third-party toolbar looks blurry beside the rest of the application.

WPF buyers notice when a third-party toolbar looks blurry beside the rest of the application. Every toolbar icon is a XAML vector path, not a PNG - crisp at 100%, 150%, and 200% scaling, on 4K monitors and per-monitor DPI setups, with Options.ToolbarIconSize offering small, medium, and large sets. The toolbar lives visually inside your WPF application instead of looking like an older component pasted on top.

Crisp XAML vector toolbar icons in the WPF HTML editor at high DPI
13 Match Your App's Theme with One ResourceDictionary The editor uses standard WPF theming: swap a ResourceDictionary and it follows your light mode, dark mode, or corporate design system - no…

The editor uses standard WPF theming: swap a ResourceDictionary and it follows your light mode, dark mode, or corporate design system - no proprietary skin engine, no separate theme format to learn. For teams that need to retemplate end to end, the Source Code License includes the full control source.

The same WPF HTML editor shown in the default theme and a branded theme
14 The Editor Never Fights Your App's Shortcuts In a real application Ctrl+S, Ctrl+F, and Ctrl+P already mean something.

In a real application Ctrl+S, Ctrl+F, and Ctrl+P already mean something. KeyBindings binds, remaps, disables, or overrides any of 35 editor actions by EditorActionId, so familiar editing shortcuts stay where users expect them - and your application's global commands win whenever they should.

C# code remapping WPF HTML editor shortcuts through KeyBindings and EditorActionId
15 Make the Toolbar Belong to Your App Use the built-in toolbar as shipped, hide commands a role should not see, or add your own XAML buttons beside the standard ones.

Use the built-in toolbar as shipped, hide commands a role should not see, or add your own XAML buttons beside the standard ones. ToolbarItemOverrider intercepts built-in actions and StateQuery keeps custom UI in sync, so the editor follows your product's rules instead of imposing its own.

Custom Insert clause button added to the WPF HTML editor toolbar
16 Every Dialog Can Carry Your Brand The image, hyperlink, table, search, symbol, YouTube, style-builder, and spell-check dialogs are real WPF windows that ship with source…

The image, hyperlink, table, search, symbol, YouTube, style-builder, and spell-check dialogs are real WPF windows that ship with source code and replacement interfaces - IImageDialog, ITableDialog, and the rest. Restyle them, wire them to your asset library, or swap in your own; the right-click menu is yours too via EditorContextMenuStrip.

Branded custom image dialog opened from the WPF HTML editor
17 Feels Native in Your Customers' Language Toolbar, tooltips, dialogs, and context menus ship localized in 14 languages - German, French, Spanish, Italian, Dutch, Portuguese, Polish,…

Toolbar, tooltips, dialogs, and context menus ship localized in 14 languages - German, French, Spanish, Italian, Dutch, Portuguese, Polish, Czech, Swedish, Danish, Norwegian, and both English variants - one Language property switches everything. Spell-check language is configured separately through SpellCheckOptions.SpellCheckLanguage, because the application shell and the authored content do not always match.

WPF HTML editor toolbar and tooltip shown in German
18 Rich Styling Without Teaching Anyone CSS The visual style builder gives users dialog-driven control over fonts, colors, borders, backgrounds, and spacing - more power than plain…

The visual style builder gives users dialog-driven control over fonts, colors, borders, backgrounds, and spacing - more power than plain rich text, with no raw markup in sight. Your own styling pages can sit beside the built-in ones through IEditorStylePage.

Visual CSS style builder dialog open over a document in the WPF HTML editor
19 Compose Visually, Inspect the Real HTML Writers stay in WYSIWYG; developers and power users switch to a formatted, indented source view or a read-only preview of the same document.

Writers stay in WYSIWYG; developers and power users switch to a formatted, indented source view or a read-only preview of the same document. What you save is markup you can actually read - which matters once content lives in templates, tickets, and mail pipelines.

WYSIWYG document beside the formatted HTML source view in the WPF HTML editor
20 Need it for WinForms? Building on Windows Forms instead?

Building on Windows Forms instead? A separate WinForms HTML Editor Control exists with its own landing page, documentation, and licensing. Pick the control that matches your UI stack, then test the trial in the application you actually ship.

Try all 20 capabilities in the free trial.

Compatibility

Supported environments.

.NET Framework

4.5, 4.7.2, 4.8

.NET

5, 6, 7, 8, 9, 10

Visual Studio

2019, 2022, 2026

Terms that have become rare.

01

Your users' data never leaves their machine.

The control runs entirely inside your application. Nothing it edits ever touches our servers - there is no cloud dependency to disclose in your compliance review.

02

You buy it once. It is yours.

A true perpetual license, sold this way since 2007. No subscription meter running while you finish the work.

03

One-to-one support from a human domain expert.

Not a chatbot, not a call center. Support is a live conversation with the engineers who build the software. One call away, on Zoom or Teams, free.

From developers who shipped with it.

This WPF Html Editor Control gives our customers the possibility to easily create nice looking E-Mail letters. Easier customization and implementation of the control saved us a lot of time during development.
Sebastian Radloff Sebastian Radloff Consultant and Developer, Comsol Unternehmenslösungen AG, Germany Verified via LinkedIn

Integrating this week? Talk to the engineers who build it.

Every trial and every license includes free live 1:1 sessions on Zoom or Teams. You will talk to a real human, a domain expert who builds this software, and we will help you wire it into your app. No chatbot, no call center, no ticket queue.

Weigh it yourself. The evaluation build is the full control, in your solution, today.

Download free trial

C# and VB.NET samples · 14-day evaluation

Book a live demo

Free, 1:1 with our engineers