Search code examples
.netwinformswmd-editor

Is it possible to use a html editor like WMD or jsFiddle in a windows form?


I want to make a simple text editor windows app using .net. I really like WMD editor and the jsfiddle editor, but I don't have the slightest idea how to put an html textbox into a windows app and have it interact with the windows app.

How can I do something like this?

My first thought is to use the browser control then use HTMLAgilityPack and parse the html of the browser control to get the values, but that seems really out there and ridiculous.


Solution

    • Your idea of using a browser control, HTMLAgilityPack etc isn't that 'out there', once you get everything working it should be fairly solid
    • You could spin up a local web server using something lightweight like Nancy, and have your hosted editor paste to the server on save. That would be a bit more extensible (and fun).
    • Alternatively you could try a native control like this FastColoredTextBox project on CodeProject. I haven't tried it yet but I intend to.