WinForms HTML Editor

A few years ago I wrote a WinForms HTML Editor. As I have been working in WinForms again it seemed appropriate to post the code up to a new location:

A document describing the control can be found here: Html Editor Application.pdf

The purpose of the Html Editor is to provide Html Editing capabilities within a WinForms control; satisfying the requirements of input for rich text layouts and simple portal type information. Examples of the former are case where the Rich Text control would normally be utilized; documentation, complex descriptions where text formatting is required, correspondences, bulletins, etc. Examples of the latter case are such items as dashboards; news clips, announcements, company references, etc. These are defined by cases where complex layouts are required that may include images and links.

The control emulates the operations that are available within a Rich Text control, but have information persisted and restored using an Html BODY element.

A sample of it being used within a Form is provided with the code download; as shown here:


Comments (14)
  1. Visual Guard says:


    thanks for posting…very nice content…

  2. Suraj says:



    I am doing R&D on this tool. May i know how to integrate spell checker with tool.



  3. Carl Nolan says:

    HI Suraj

    I did look at spell-checking a while ago (10 years ago :-)). I can be done working on the DOM by parsing the DOM contents. Been a long while since I ahve looked I'm afraid. Let me know how you get on.

    What R&D are you looking into?

  4. weng says:

    i found the source code on this in in created by someone

  5. Can i get the selected position says:

    Thanks for the useful HTML editor, but can you help me please, i want to get the start and end position for the selected (highlighted) HTML from the editor

  6. eli says:

    How can I move the toolbar to the top of the control?

    I've tried to change the "Dock" attribute of the toolbar to "Top", but nothing happens…

  7. Carl Nolan says:

    Changing the ToolbarDock at design time should work fine; just tried out the code.

    Are you changing the ToolbarDock property?

  8. Anonymous says:

    Thanks Carl, just found your amazing control. Kindly give a permission to slight modify your control according my needs :). I'd like to modify your hreflink so that it can open other Winform (not website). Any hints to do that ? Coz i didn't find things on your control that can catch event hyperlink click.

    Thanks in advance

  9. Anonymous says:

    Nice post!

    But I discovered a little bug:

    The first string you insert into innerText will not appear in innerHTML with <p></p> tags!

    But if you delete the string and insert a new string then the <p></p> tags appear.

    I hope you can helb me with this.

  10. Jim says:

    Hi Carl, and thanks for this great control.  Is there a way for me to disable or hide the copy/cut/paste menu items?

    I'm running into issues when a user pastes from outside the control – the fonts, size, etc are pasted along with the text, and I need to control that.



  11. Vins says:

    can you share like this one, but not in C#… I mean for 😀


  12. Vins says:


    ya but last updated the project is 2005 and for old framework… when I open in VS2013 is failed

    I think someone must be recreate for version 🙁

  13. David Muñoz says:

    Carl, is it already possible to download the Framework 1.1 original version of the control?

  14. Victor says:

    Would have been nice if you added Spell Checker Support

Comments are closed.

Skip to main content