Extension:FCKeditor (Official)

FCKeditor extension enables a more intuitive WYSIWYG editor when editing pages on a MediaWiki-based site. It uses a special version of the FCKeditor WYSIWYG editor that outputs wiki text rather than the usual HTML that caused problems for MediaWiki integrations in the past.

Download the extension
First of all, you need to download and install the MediaWiki extension. Currently you can download this through SVN or get it from: http://mediawiki.fckeditor.net/nightly/svn/mediawiki_fckeditor_ext_N.zip (Size: 1,2 MB). The extension does not contain the editor itself. If you are a UNIX user, you must install the Subversion package unless it's already installed. If you are a Windows user, read the SVN_Instructions for more details.

On UNIX, in your $IP/extensions directory, you can type the following command to install the FCKeditor extension:

svn checkout http://svn.fckeditor.net/MediaWiki/trunk FCKeditor

You will also need to download the actual editor. It can be downloaded from SourceForge. See FCKeditor's download page for more details.

Verify/Rename Configuration Files
Verify the files fckeditor_config.js and \plugins\mediawiki\fckplugin.js exist. In case they come with .txt extension, rename the files to .js extension.

Modify configuration file
After you've downloaded the extension and actual editor, add this line at the end of LocalSettings.php:

Also make sure $wgUseAjax is turned on (it is by default on newer MediaWikis).

EditPageBeforeEditConflict
In the latest MediaWiki (1.13, SVN version), new hook EditPageBeforeEditConflict is already available. This hook is required to fix WikiText/HTML problems when conflict occurs.

MediaWiki 1.10 - 1.12 users have to add this hook manually.

In includes/EditPage.php, at the end of showEditForm function, find this code: and replace with:

SanitizerAfterFixTagAttributes
In MediaWiki 1.13, new hook SanitizerAfterFixTagAttributes is already available. This hook is required to keep templates defining tag attributes.

MediaWiki 1.10 - 1.12 users have to add this hook manually.

In includes/Sanitizer.php, at the end of fixTagAttributes function, find this code: and replace it with:

MediaWiki 1.13
This zip file contains all the files necessary for FCKeditor to work seamlessly - including the extension, the editor and all the necessary patches.

Unzip this file into your extensions directory and add the following lines to your LocalSettings.php

That's it. It should work.

If you would like to download the older versions from the SVN, read on...

Full details for installing FCKeditor are available at http://mediawiki.fckeditor.net/index.php/FCKeditor_integration_guide.

MediaWiki 1.14
 The current Version (14.3.2009) includes the new mw14-directory, but does not work 100% out of the box with 1.14. Internal Links will break. Don't know if the following patch will solve this problem...

From version 1.14, MediaWiki dropped the Parser_OldPP class which is used by the FCKeditor extension. This issue can be solved quite easily. According to its author, the solution is only a dumbfix but as it is working and as this is the only current way to have this extension working on the current version of mediwiki, it is described it in the following. The raw patch file can be found here (before the developers really find a solution). Mainly this patch basically contains a copy of FCKeditorParser.body.php moved into the mw12/ directory and completed with the old replace_callback function.

Finally, create a file called /extensions/FCKeditor/mw12/FCKeditorParser.body.php and copy / paste the following code.

More information
For more information please refer to the official site of the project