Rich text editing: RichTextBox or the HTML Editor

    Windows Forms offers two practical routes to a rich text editor: the built-in RichTextBox, which stores RTF, and an HTML editor control, which stores HTML. The right choice depends on where the formatted content is used after the user saves it. This guide gives the deciding factors and the code to load and save content with the WinForms HTML Editor.

    The real SpiceLogic WinForms HTML Editor with a formatted sample HTML template, its complete editing toolbars, and Design, Source and Preview controls.
    The real SpiceLogic WinForms HTML Editor with a formatted sample HTML template, its complete editing toolbars, and Design, Source and Preview controls.
    Choose by the saved format: RTF for document-format workflows; HTML for email bodies, reusable templates and web content.
    Choose by the saved format: RTF for document-format workflows; HTML for email bodies, reusable templates and web content.

    Decide by where the content goes

    Formatting on screen looks the same in both controls. The difference is the format you are left holding afterwards.

    What you needRichTextBoxWinForms HTML Editor
    Saved formatRTFHTML
    Send the content as an email bodyConvert RTF to HTML firstUse the saved HTML as it is
    Show the content on a web page or in a reportConvert RTF to HTML firstUse the saved HTML as it is
    Formatting toolbar, table and image dialogsYou build themIncluded
    Spell checkingYou add itIncluded
    Mail-merge placeholders for templatesYou build themIncluded
    Source view for the markupNot applicableIncluded, with a preview

    When RichTextBox is enough

    Choose RichTextBox when the formatted text is written and read only inside your own application: internal notes, a comments field, a log viewer with coloured lines. RTF never has to leave the form, and a few formatting buttons cover the need.

    When to choose an HTML editor

    Choose the HTML Editor when the content leaves the form. Typical cases:

    • Users compose email messages or reusable email templates that your application sends.
    • Content is stored in a database and later shown on a website, a customer portal or a report.
    • Users paste from Word or Outlook and expect the formatting to arrive intact.
    • Templates carry placeholders such as a customer name that your code fills in at send time.

    In each case the editor already produces the format the destination expects, so there is no conversion layer to write, test and maintain.

    Load and save HTML

    Add the control from NuGet (Install-Package SpiceLogic.HtmlEditor.WinForms), place it on a form, then read and write the content through BodyHtml. Use DocumentHtml when you need the complete document, including the head.

    // Load the saved message into the editor
    winFormHtmlEditor1.BodyHtml = template.Body;
    
    // Save what the user wrote
    template.Body = winFormHtmlEditor1.BodyHtml;
    
    ' Load the saved message into the editor
    WinFormHtmlEditor1.BodyHtml = template.Body
    
    ' Save what the user wrote
    template.Body = WinFormHtmlEditor1.BodyHtml
    

    The saved string is ready to use as an email body or to store in a text column.

    Next steps

    Last updated on Nov 11, 2026

    Put this into practice.

    Clone the C# and VB.NET sample projects from GitHub. Start with Quickstart, then explore the feature samples.

    Prefer a guided look? Book a free live demo with our engineers - live on Zoom or Teams, never a chatbot.