Extension:FCKeditor (Official)

Intro
This 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. See the following link for a working example of this extension in action: http://mediawiki.fckeditor.net/index.php/Main_Page.

It is being jointly developed by the FCKeditor authors and Wikia.

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

Download the extension
First of all, you need to download and install the MediaWiki extension. Currently you must download this through SVN. The extension does not contain the editor itself. If you are a UNIX user, you must install the subversion package. If you are a Windows users, read the SVN_Instructions for more details.

On UNIX, you can type the following commands (you must first set the variable MEDIAWIKI_HOME with the base path of your MediaWiki installation ):

$ cd $MEDIAWIKI_HOME $ cd extensions $ svn checkout http://svn.fckeditor.net/MediaWiki/trunk FCKeditor $ find. -name .svn -print | xargs rm -rf {}
 * 1) (wait a few minutes)
 * 1) For security purposes, you should remove the .svn files.
 * 2) You can also configure your webserver to deny access to .svn directories

Now your directory structure should look similar to the following one: $ cd $MEDIAWIKI_HOME $ tree |- ...  |- FCKeditor |- css |- &lt;b&gt;fckeditor&lt;/b&gt; |- plugins |- FCKeditor.body.php |- fckeditor_config.js     |- FCKeditor.i18n.en.php |- ...      |- FCKeditorParser.body.php |- FCKeditorParserOptions.body.php |- FCKeditor.php |- FCKeditorSajax.body.php |- FCKeditorSkin.body.php Inside the directory extensions/FCKeditor is a directory named fckeditor. It is here that the editor (next step) will be installed.
 * - docs
 * - extensions
 * - extensions

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.

Download the editor
Download the editor. You can get this via normal HTTP, via FTP, or via SVN. Examples are given for HTTP and SVN.

Via HTTP, you can get the latest stable version, or you can get the latest nightly build. The example below is on UNIX and for the nightly build (http://www.fckeditor.net/nightly/FCKeditor_N.tar.gz):

$ cd /tmp $ w get http://www.fckeditor.net/nightly/FCKeditor_N.zip $ cd $MEDIAWIKI_HOME $ cd extensions/FCKeditor $ unzip /tmp/FCKeditor_N.zip

Modify configuration file
Place the contents of the FCKeditor folder you have just downloaded in to the folder 'extensions/FCKeditor/FCKeditor/'. After you have put the FCKeditor extension in the correct directory, add this line at the end of LocalSettings.php:

Also make sure $wgUseAjax is turned on:

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 the latest MediaWiki (1.13, SVN version), 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:

ParserOptions.php Error
In MediaWiki 1.13, the ParserOptions.php file has been moved. To fix this issue, edit FCKeditor.php and change line 29 to the following.

And line 33:

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