Stop fighting RTF and Word paste. Give your WinForms users a real HTML editor.

Download Free Trial
C# & VB.NET sample projects14-day evaluation
Tutorials
Video Demonstration for Rational Will
Package Manager Console
PM> Install-Package SpiceLogic.HtmlEditor.WinForms

Meet the WinForms HTML Editor

Drag the control onto a Windows Forms designer surface and you have a working HTML editor: toolbar, WYSIWYG surface, source view, preview mode, context menus, dialogs, spell checking, table editing, and image insertion.

The point is not to make you build an editor framework. The point is to give your application a practical HTML composition surface that your users can start using quickly.

WinForms HTML editor control showing the toolbar, editing surface, and WYSIWYG source preview modes

Install in One Line with NuGet

Add the editor to your WinForms project from NuGet:

PM> Install-Package SpiceLogic.HtmlEditor.WinForms

The current line supports .NET Framework 4.5, 4.7.2, 4.8, and .NET 5 through .NET 10 on Windows, so it fits both maintained legacy WinForms apps and newer Windows desktop projects.

The 9.x line also replaces the older license-file flow with license-key activation.

Installing SpiceLogic HtmlEditor WinForms from NuGet in Visual Studio Package Manager Console

Switch Between WYSIWYG, Source, and Preview Modes

Use WYSIWYG mode when users want to compose visually. Switch to Source mode when a developer or power user needs to inspect the generated HTML. Use Preview mode when the content should be rendered read-only before saving or sending.

The Source mode is formatted and indented, so your users are not staring at one long unreadable line of markup.

In Preview mode, Ctrl-clicking a hyperlink opens it in the user's actual default browser rather than forcing legacy Internet Explorer behavior.

Formatted HTML source view in a WinForms HTML editor control showing indented markup

Clean HTML Output, Fragment or Full Document

Some screens need an HTML fragment. Some workflows need a full document. The editor gives you both:

  • BodyHtml: the inner HTML of the document body, useful when you store content inside your own page, template, or database field.
  • DocumentHtml: the full HTML document, including document wrapper and header information, useful when you save or send standalone HTML.

HTML5 is the default document type, with override controls available for older render targets.

BodyHtml and DocumentHtml output options for clean HTML fragment or full document

Paste From Word and Outlook Without the Mess

Your users will paste from Word and Outlook. That is not a maybe. The real question is whether your editor leaves you with usable HTML or a pile of Microsoft Office clipboard noise.

The editor auto-detects Microsoft Word and Outlook clipboard content and cleans the pasted HTML automatically. Users do not need to remember a special "Paste from Word" button, and developers are not left chasing MsoNormal markup through saved templates.

If your application needs stricter rules, the Pasting event gives you a checkpoint before clipboard content enters the document.

Microsoft Word content pasted into WinForms HTML editor with clean HTML output

Insert Images From File, URL, Clipboard, or Base64

Users can insert images from a local file, an absolute URL, or directly from the clipboard. Depending on your configuration, local images can be referenced by path or embedded as Base64 so the HTML becomes self-contained.

Large pasted images can be resized automatically with MaxPastedImageWidth, so one oversized screenshot does not destroy the layout of an email, ticket, or knowledge-base article.

When you need portable output, EmbedLocalImagesAsBase64() can walk the document and convert local images into Base64 Data URIs.

Clipboard image inserted into WinForms HTML editor and embedded as Base64 data URI

Spell Check Out of the Box

Spell check should not become another deployment project. The default setup includes an embedded US English dictionary, so basic spell checking works without asking you to copy native dictionary DLLs beside your application.

The current implementation uses a pure-managed Hunspell-family engine, with support for OpenOffice .dic and .aff dictionary files when you need additional languages. Inline red-squiggle checking and dialog-based spell checking are both supported.

If your product already has its own spelling engine, plug it in through ISpellCheckerEngine.

Inline spell checking with red underline and suggestion menu in WinForms HTML editor

Localized Editor UI and Language Support

For international desktop software, the editor itself cannot stay English-only. Use EditorLanguage to localize toolbar text, tooltips, dialogs, and context menus.

Supported language packs include German, Dutch, French, Spanish, Italian, Polish, Portuguese for Brazil and Portugal, Norwegian, Czech, Swedish, and Danish.

Spell-check language can be configured separately, so the application UI and the content language do not have to be the same.

Localized WinForms HTML editor toolbar showing German tooltips and dialogs

Fully Customizable Toolbar

Use the built-in toolbar as-is, remove commands your users should not see, replace button behavior, or build your own toolbar around the editor services.

ToolbarItemOverrider lets you intercept built-in toolbar actions. The StateQuery service lets your UI know whether the current selection is bold, italic, inside a table, undoable, redoable, and more.

That means your toolbar can behave like a real part of your app instead of a third-party island bolted onto the form.

Learn More
Customizable WinForms HTML editor toolbar with custom buttons added by the developer

Remap Keyboard Shortcuts

An embedded editor should not fight the host application for keyboard shortcuts.

The KeyBindingsManager exposes binding, unbinding, overriding, disabling, enabling, and querying for editor actions represented by EditorActionId. Use it to align the editor with your application's shortcut conventions for bold, italic, cut, copy, paste, undo, print, search, spell check, list commands, alignment commands, insert commands, and other editor actions.

Use it to keep familiar shortcuts where users expect them, or to let your host application's global commands win when the editor has focus.

Remapping editor keyboard shortcut Ctrl+B via KeyBindingsManager in Visual Studio

Customize Every Dialog

You are not locked into the default dialogs. The source code for the editor dialogs is provided so you can study, brand, customize, or replace them.

Replacement interfaces include IImageDialog, IHyperlinkDialog, ISearchDialog, IStyleBuilderDialog, ISymbolDialog, ITableDialog, ITableCellDialog, IYouTubeVideoInsertDialog, and ISpellCheckerDialog.

You can also provide your own ContextMenuStrip through EditorContextMenuStrip, so right-click behavior can match the rest of your application.

Learn More
Default and custom image insertion dialogs for WinForms HTML editor control

Intelligent Table Editing

Tables are where many simple HTML editors start to fall apart. Users insert a table, edit a few cells, then the next dialog open no longer understands what is already there.

The two-way table dialog is designed to read the existing table structure and styling back from the document, so users can continue editing rows, columns, borders, cell styling, and structure without starting over.

For code-driven workflows, Content.TableAuthoringService exposes table operations such as InsertRow, InsertColumn, and MergeSelectedCells.

Two-way table editing dialog in WinForms HTML editor showing structure and cell styling

Visual CSS Style Builder

Not every user who needs formatting should be asked to write CSS. The visual style builder gives users a dialog-driven way to adjust common formatting choices such as fonts, colors, borders, background, and spacing.

Developers can use it at design time or runtime. Advanced teams can extend the style builder with custom pages using IEditorStylePage and FormSelectorPageAttribute.

Visual CSS style builder dialog in WinForms HTML editor for fonts colors borders

Take Control of Every Paste

The Pasting event gives your application a checkpoint before clipboard content becomes part of the document.

Use it to clean HTML, strip unwanted tags, block oversized content, rewrite image references, reject external links, or apply your own business rules before the editor accepts the paste.

This matters in real enterprise apps, where "just let users paste anything" eventually becomes a support, security, or data-quality problem.

Pasting event handler intercepting clipboard HTML in WinForms HTML editor application

Mail-Merge Placeholder Support

Many business editors are not just free-form text boxes. They are template builders. Users need to insert fields like customer name, invoice number, due date, ticket ID, assigned agent, or company name.

The mail-merge placeholder API lets your application define the available fields and expose placeholder insertion through the editor workflow. Users insert placeholders at the caret, and your application replaces them later when generating the final message or document.

This is useful for email templates, CRM messages, invoice notes, notification bodies, support replies, and document templates.

Mail merge placeholders inserted into an HTML template in WinForms HTML editor

Developer Power Features

  • Content service. Read, set, insert, transform, and export HTML through the Content service.
  • Caret service. Get and set caret position by point or index through the Caret service.
  • Editor commands. Cut, copy, paste, undo, redo, search, replace, print, print preview, and command execution through the Editor service.
  • Formatting service. Apply bold, italic, underline, font, colors, alignment, lists, headings, and format removal through Formatting.
  • Selection service. Read selected HTML, select text, select all, trim selections, and inspect selection data through Selection.
  • State query service. Ask whether the current selection is bold, italic, inside a table, undoable, redoable, and more through StateQuery.
  • Change tracking. Use HtmlChanged to drive dirty flags, save prompts, and live previews.
  • Email-ready output. Use GetEmailMessageWithLocalImagesEmbedded() when you need a mail-ready message with local images embedded.
WinForms HTML editor service APIs Content Caret Editor Formatting Selection StateQuery

Need it for WPF?

Building a WPF application instead of Windows Forms? We also offer a separate WPF HTML Editor Control with its own landing page, documentation, and licensing.

Use this page for WinForms applications. Use the WPF product page when your application is built on WPF.

Hear From Our Clients