This Mac sample is quite useful for authoring and viewing Markdown files, but also offers a little insight into building a hybrid web and native Mac application.
MonoMac.AppKit.NSDocumentis used for automatic document handling.
MonoMac.WebKit.WebViewcontrol is used for rendering.
- File system monitoring through
MonoMac.CoreServices.FSEventStreamis used to monitor the loaded document for changes.
- Changes made are reflected by replacing content directly in the
- Navigation events are intercepted to open links in the system browser.
Under the hood
The Sundown C library is used to actually convert Markdown to HTML. In addition all the Github extensions are enabled. A small C# binding to Sundown is included.