I have a python application which need a gui HTML editor, I开发者_StackOverflow know FCKeditor is nice, so how to embed the FCKeditor in a python desktop app?
To embed FCKeditor (or maybe better the current CKeditor?), you basically need to embed a full-fledged browser (with Javascript) -- I believe wxPython may currently be the best bet for that, as I hear it has wxIE for Windows and wxWebKitCtrl for the Mac (I don't know if old summer-of-code ideas about making something suitable for Linux ever panned out, though). Most "HTML viewer" widgets, in most GUIs, don't support Javascript, and that's a must for (F?)CKeditor.
In order of difficulty:
If you just need to support Windows, you can embed IE in wx - see the docs and demos.
wxWebKit is looking a bit more mature, but it's still in development.
You could just use the web-browser using webbrowser.open(url). Things will be very crude, and interaction will be a pain.
A fourth option - you could try out pyjamas for your whole GUI, then run it all in a web-browser.
精彩评论