Feed on Posts or Comments 05 February 2012

MediaWiki robchurch on 13 Jun 2007 08:29 am

FCKeditor

FCKeditor and MediaWiki 1.9.3

We had a visitor to #mediawiki yesterday, who was trying to get FCKeditor working with MediaWiki 1.9.3, and was at his wits’ end to the point where he was offering monetary rewards to anyone who could help him.

In my usual folly, I made him an interesting offer:

<robchurch> I tell you what, if I can get it working, from scratch, with MediaWiki 1.9.x, within half an hour, I'll tell you exactly how to do it, for nothing.

Well once I’d downloaded the editor and checked out 1.9.3 from a tag, and read the pertinent documentation on working with FCKeditor, I like to think it didn’t take me long to get it done…under 30 minutes, in fact. :D

My second mistake, of course, will have been making it available to everyone else, too. Should work with any version after 1.9.3, although there is some patching of MediaWiki involved (one line in the autoloader, and a couple of lines in the edit form code), and you have to enable raw HTML (but don’t panic, FCKeditor seems to be protecting against malicious-looking HTML), but someone else ought to find this useful.

Update: I’ve updated the patch to fix some bugs and incorrect assumptions, noted on the discussion page. I should also point out that it’s not FCKeditor protecting against the malicious HTML, but MediaWiki’s own Sanitizer class, which has been tweaked in the new patch to allow some FCKeditor-generated HTML elements through to allow the nifty table generator, etc. to work.

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply