Non-partisan software developer

Tuesday, April 10, 2007

FCKeditor running on the desktop


I've always loved FCKeditor and I used it ever since the pre 1.0 days. We had a requirement at work where we needed to allow users to edit HTML and our solution was for them to type the markup by hand.

So I had a crazy idea to try to use FCKeditor on the desktop. The general idea was to host the FCKeditor html files inside the WebBrowser control. So one night I hacked together a
prototype and it worked! Eventually another developer at work took my hack and built a working component using it as a reference. It worked well for him and I was surprised it turned out so nice.

A while back I saw a post on Channel9 where someone was asking about using FCKeditor in a desktop scenario and they got some replies like: "you can't do that...FCKeditor is written in html and javascript, it's for the web."

I posted about my experience with it and I'll get emails asking how to do it; so I decided to do a quick demo. Eventually I think I'd like to see an open source version that is robust and exposes much more functionality. My demo only allows for saving and retrieving html documents.





The demo application running WinFckEditor. The magic is in the ability to call JavaScript methods from C# using InvokeScript like this:




I've posted a sample project: WinFckEditor.zip