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:

https://code.msdn.microsoft.com/WinForms-HTML-Editor-01dbce1a

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:

image

Comments

  • Anonymous
    September 06, 2011
    Hi,thanks for posting...very nice content...

  • Anonymous
    February 16, 2012
    Hi,thanks.I am doing R&D on this tool. May i know how to integrate spell checker with tool.Regards,Suraj

  • Anonymous
    February 19, 2012
    HI SurajI 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?

  • Anonymous
    April 26, 2012
    i found the source code on this in planetsourcecode.com in vb.net created by someone

  • Anonymous
    August 01, 2012
    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

  • Anonymous
    December 30, 2012
    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...

  • Anonymous
    January 04, 2013
    Changing the ToolbarDock at design time should work fine; just tried out the code.Are you changing the ToolbarDock property?

  • Anonymous
    February 13, 2013
    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

  • Anonymous
    February 14, 2013
    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.

  • Anonymous
    October 25, 2013
    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.Thanks,Jim

  • Anonymous
    January 11, 2014
    can you share like this one, but not in C#... I mean for VB.net :Dthx

  • Anonymous
    January 11, 2014
    @weng:ya but last updated the project is 2005 and for old framework... when I open in VS2013 is failedI think someone must be recreate for VB.net version :(

  • Anonymous
    August 19, 2015
    Carl, is it already possible to download the Framework 1.1 original version of the control?

  • Anonymous
    August 28, 2015
    Would have been nice if you added Spell Checker Support