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 Official MCP serveryour assistant writes the real API 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.

Official MCP server

Your assistant reads this control's real signatures and real documentation pages instead of guessing from stale training data, so the first integration it writes actually compiles.

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 Visual Studio with GitHub Copilot, create .mcp.json beside the solution with a servers entry named spicelogic-wpf-editor whose url is https://mcp.spicelogic.com/html-editor/wpf, then use Agent mode and enable the SpiceLogic tools. 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. In Claude Code run: claude mcp add --transport http spicelogic-wpf-editor https://mcp.spicelogic.com/html-editor/wpf . 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 · 19 capabilities

19 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

Binds Like Any Other WPF Control

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 two-way binding line for BodyHtml shown large above the running WPF app it drives
03

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 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
The complete index
04 Paste From Word and Outlook Without the Mess Your users will paste from Word and Outlook - the only question is what your database receives.

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
05 Official MCP Server for AI Coding Assistants SpiceLogic runs an official Model Context Protocol (MCP) server for this control, and it is not tied to one vendor's assistant.

SpiceLogic runs an official Model Context Protocol (MCP) server for this control, and it is not tied to one vendor's assistant. Point whichever tool your team already works in at it and it reads the real method signatures, the real documentation pages, and snippets that compile today, instead of inventing an API from stale training data. It is a remote endpoint over HTTPS, so there is nothing to install on a developer machine and no key to manage.

GitHub Copilot in Visual Studio. In Visual Studio 2026 or Visual Studio 2022 (17.14 or later), save a .mcp.json file beside your solution containing { "servers": { "spicelogic-wpf-editor": { "url": "https://mcp.spicelogic.com/html-editor/wpf" } } }, then switch Copilot Chat to Agent mode and enable the SpiceLogic tools. Commit that file and every developer on the team is connected on their next pull.

GitHub Copilot in VS Code. The same JSON goes in .vscode/mcp.json, with "type": "http" added beside the URL.

Claude Code, OpenAI Codex, Cursor, Claude Desktop. Run claude mcp add --transport http spicelogic-wpf-editor https://mcp.spicelogic.com/html-editor/wpf or codex mcp add spicelogic-wpf-editor --url https://mcp.spicelogic.com/html-editor/wpf; Cursor and Claude Desktop take the same URL.

One prompt beside the real WpfHtmlEditor signatures returned live by the SpiceLogic MCP server
Read the walkthrough
06 Clean HTML Your Database and Email Can Trust One screen saves a fragment into a SQL column; another sends a complete document by email.

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.

BodyHtml and DocumentHtml panes shown beneath the editor, both carrying the editor's own clean output
07 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
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 red in the WPF HTML editor while the spell checker dialog corrects one of them with real suggestions
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.

A 1920 pixel product photo inserted into the WPF editor and automatically constrained to 320 pixels, with the image properties dialog showing the source file, alt text and locked aspect ratio
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.

Toolbar icon cluster rendered at 100, 150 and 200 percent display scaling with one icon enlarged 32 times, staying crisp
13 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
14 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
15 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.

A fully branded asset-picker dialog replacing the built-in image dialog through IImageDialog
16 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.

A German tooltip on the editor toolbar shown magnified, proving the control's own interface is translated
17 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
18 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
19 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 19 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