Extension:FCKeditor (Official)

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

MediaWiki 1.16 and newer
For MW 1.16 and later a new version is available on svn.wikimedia.org; it's a fork of the original FCKeditor extension and it requires 1.16. In this case, the extension is complete, i.e. unlike older versions it contains the FCKeditor/fckeditor itself.

Note: If you had installed a previous version, involving a separate check-out from svn.fckeditor.net for the editor itself, you may have to remove the extensions/FCKeditor folder and check it out again from svn.wikimedia.org.

MediaWiki 1.15 and older
If you have a wiki running 1.15 or lower version of MW, you can still use the extension available from http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/FCKeditor/. The repository will go and fetch the required fckeditor. 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: See FCKeditor's download page for more details. Manual modifications were required for some older versions of FCKeditor. See Manual modifications for more info.

Verify/Rename Configuration Files
Verify that the files  and   does exist. In case they come with .txt extension, rename the files to .js

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).

Fix hook error
On php version (>= 5.3.0) the following error shows up with the HTTP download: PHP Warning: Parameter 1 to FCKeditor_MediaWiki::onCustomEditor expected to be a reference, value given in C:\inetpub\wwwroot\Wiki_Neuro\includes\Hooks.php on line 133 To fix this, change FCKeditor.body.php: public function onCustomEditor(&$article, &$user) { to public function onCustomEditor($article, $user) {

Note: This problem is caused by the PHP version and affects all versions of MediaWiki using the version from the HTTP download. The current 1.16.x snapshot does not produce this error.

Thanks and credits to solweig

Parameters

 * $wgFCKEditorExtDir &mdash; path to FCKeditor extension. Defaults to extensions/FCKeditor.
 * $wgFCKEditorDir &mdash; path to the actual FCKeditor. Defaults to extensions/FCKeditor/fckeditor/.
 * $wgFCKEditorToolbarSet &mdash; defaults to 'Wiki'.
 * $wgFCKEditorHeight</tt> &mdash; '0' for automatic ('300' minimum). Defaults to '0'</tt>.
 * $wgFCKEditorExcludedNamespaces</tt> &mdash; array of namespaces that FCKeditor is disabled for. Use constants like NS_MEDIAWIKI here. Defaults to an empty array.

UserOptions
Edit the file FCKeditor.php, to change these user options:
 * riched_disable
 * riched_start_disabled : This is set to 1 by default meaning that FCKEditor is DISABLED by default.Set this to 0 to enable FCKEditor by default
 * riched_use_popup
 * riched_use_toggle
 * riched_toggle_remember_state


 * 1) Change the user options for new account: Manual:$wgDefaultUserOptions.
 * 2) Change the users' preferences: Manual:Maintenance scripts.
 * - No SSH access? Look at Extension:MaintenanceShell.

Example
If you set $wgDefaultUserOptions['riched_start_disabled'] = 1;</tt> the rich editor does not get started automatically after clicking on the edit button of the page.

Auto-fill the link dialog with selection
var TxtSelection = FCK.Selection.GetSelection ; <script type="text/javascript">document.getElementById('txtUrl').value = TxtSelection ; StartSearch ;
 * Edit FCKEditor/plugins/mediawiki/dialogs/link.html
 * add this line before // oLink: The actual selected link in the editor :
 * add this line before :

Change the skin
replacing default by your folder's name
 * Get (or make) your skin folder (for example, here)
 * Put it in FCKEditor/fckeditor/editor/skins
 * Edit FCKEditor/fckeditor/fckconfig.js and change the following line :

Deactivate the "Paste as plain text" dialog
Considering what you're doing most of the time (copying rather between wiki pages of from other web pages) this dialog can be s very time wasting, so you can just by-pass it by changing FCKConfig.ForcePasteAsPlainText to false in FCKEditor/fckeditor_config.js

Add a button to make a redirection
How to add a button that adds #REDIRECTlink with a dialog tbButton = new FCKToolbarButton( 'MW_Redirect', 'Redirect', FCKLang.wikiBtnRedirect || 'Insert/Edit Redirection' ); tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_redirect.gif'; FCKToolbarItems.RegisterItem( 'MW_Redirect', tbButton ); FCKCommands.RegisterCommand( 'MW_Redirect', new FCKDialogCommand( 'MW_Redirect', FCKLang.DlgRedirectWindowTitle, FCKConfig.PluginsPath + 'mediawiki/dialogs/redirect.html', 400, 250 ) );
 * add an image plugins/mediawiki/images/tb_icon_redirect.gif (16x16), for example an arrow
 * go to plugins/mediawiki/dialogs, copy link.html to redirect.html
 * in this new file, add oEditor.FCK.InsertHtml( '#REDIRECT' ) ; before // Create a new (empty) anchor.
 * edit plugins/mediawiki/fckplugin.js
 * add the following code after line 37
 * add the following code in the section named // Override some dialogs.
 * edit fckeditor_config.js and add 'MW_Redirect' in the section FCKConfig.ToolbarSets['Wiki'] = , where you want to see the button

Force to refresh
When you make changes to your interface, you may get mad trying to refresh your browser, which keeps for so long the old version in cache, despite your Ctrl+F5, Shift+Refresh, etc. Here are some method that seems to work well :
 * modify "FCKeditor.php" (for example to "FCKeditor.ph") and refresh, (your browser will scream, ok), then revert to original name and refresh
 * in Firefox : go to Firefox web history, right-click on your website and chose "Forget this website", that's all

Translating
FCKeditor can be translated through translatewiki.net.

Français
Il semble que FCKEditor est abandonné. Or, j'en ai encore besoin. Si d'autres sont dans le même cas, voici un fichier de traduction qui me manquait et que j'ai fait :

extensions\FCKeditor\plugins\mediawiki\lang\fr.js 

/* * MediaWiki FCKeditor plugin * * Fichier de langue en français */

FCKLang.wikiTabEdit				= 'Editer'; FCKLang.wikiTabManual				= 'Manuel';

FCKLang.wikiBtnTemplate				= 'Insérer/éditer Modèle'; FCKLang.wikiBtnReference			= 'Insérer/éditer Reference'; FCKLang.wikiBtnReferences			= 'Insérer le bloc de références'; FCKLang.wikiBtnFormula				= 'Insérer/éditer Formule'; FCKLang.wikiBtnSpecial				= 'Insérer/éditer Special Tag'; FCKLang.wikiBtnSourceCode			= 'Insérer/éditer Source Code'; FCKLang.wikiBtnSignature			= 'Insérer signature'; FCKLang.wikiCmdTemplate				= 'Modèle Propriétés'; FCKLang.wikiCmdReference			= 'Référence Propriétés'; FCKLang.wikiCmdFormula				= 'Formule'; FCKLang.wikiCmdCategories			= 'Catégories'; FCKLang.wikiLoadingWikitext			= 'Chargement du Wikitext. Attendez SVP...'; FCKLang.wikiLoadingCategories			= 'Chargement des catégories...'; FCKLang.wikiSearchCategory			= 'Chercher categorie'; FCKLang.wikiSelectedCategories			= 'Catégories sélectionnées'; FCKLang.wikiBtnCategories			= 'Insérer/éditer catégories'; FCKLang.wikiAddNewCategory			= 'Ajouter nouvelle'; FCKLang.wikiCategoryTree			= 'Arbre des catégories'; FCKLang.wikiMnuTemplate				= 'Modèle Propriétés'; FCKLang.wikiMnuMagicWord			= 'Modifier Magic Word'; FCKLang.wikiMnuReference			= 'Reference Propriétés'; FCKLang.wikiMnuFormula				= 'Editer Formule'; FCKLang.wikiCmdSpecial				= 'Special Tag Propriétés'; FCKLang.wikiCmdSourceCode			= 'Source Code Propriétés'; FCKLang.wikiMnuSpecial				= 'Special Tag Propriétés'; FCKLang.wikiMnuSourceCode			= 'Edit source code'; FCKLang.wikiSourceCode				= 'Source Code'; FCKLang.wikiSourceLanguage			= 'Source Language';

FCKLang.wikiImgFileName				= 'Nom de fichier de l’image'; FCKLang.wikiImgNotice1				= 'L’image doit être téléversée avant'; FCKLang.wikiImgNotice2				= 'utilisez "Téléverser un fichier" dans le menu de gauche'; FCKLang.wikiImgCaption				= 'Libellé'; FCKLang.wikiImgType				= 'Special Type'; FCKLang.wikiImgTypeThumb			= 'Thumbnail'; FCKLang.wikiImgTypeFrame			= 'Cadre'; FCKLang.wikiImgTypeBorder			= 'Bordure'; FCKLang.wikiImgAlignCenter			= 'Centrer';

FCKLang.wikiImgAutomatic			= 'Recherche automatique'; FCKLang.wikiImgTooShort				= 'trop court... tapez plus de lettres'; FCKLang.wikiImgStartTyping			= 'tapez un nom ci-dessus'; FCKLang.wikiImgStopTyping			= 'attendez pour la recherche'; FCKLang.wikiImgSearching			= 'recherche...'; FCKLang.wikiImgSearchNothing			= 'pas d’images trouvées'; FCKLang.wikiImgSearch1Found			= 'une image trouvée'; FCKLang.wikiImgSearchSeveral			= '%1 images trouvées '; FCKLang.wikiImgSearchALot			= '%1 images trouvées ';

FCKLang.wikiLnk					= 'Lien'; FCKLang.wikiLnkAutomatic			= 'Résultats de recherche automatique'; FCKLang.wikiLnkNoSearchAnchor			= 'lien ancre... pas de recherche'; FCKLang.wikiLnkNoSearchMail			= 'lien e-mail... pas de recherche'; FCKLang.wikiLnkNoSearchExt			= 'lien externe... pas de recherche'; FCKLang.wikiLnkTooShort				= 'trop court... tapez plus de lettres'; FCKLang.wikiLnkStartTyping			= 'tapez un nom d’article ci-dessus'; FCKLang.wikiLnkStopTyping			= 'attendez pour la recherche'; FCKLang.wikiLnkSearching			= 'recherche...'; FCKLang.wikiLnkSearchNothing			= 'pas d’article trouvé'; FCKLang.wikiLnkSearch1Found			= 'un article trouvé'; FCKLang.wikiLnkSearchSeveral			= '%1 articles trouvés'; FCKLang.wikiLnkSearchALot			= '%1 articles trouvés';

FCKLang.wikiTeX					= 'Formule (TeX markup)'; FCKLang.wikiTeXEmpty				= 'Please type the Formule';

FCKLang.wikiSpTag				= 'Current Special Tag'; FCKLang.wikiSpParam				= 'Special tag parameters';

FCKLang.wikiRef					= 'Reference text (Wikitext)'; FCKLang.wikiRefName				= 'Reference name (optional)';

FCKLang.wikiTmpl				= 'Définition brute de Modèle '; FCKLang.wikiTmplEmpty				= 'Les Modèles doivent commencer par. Vérifiez SVP.'; FCKLang.wikiTmpsel				= '(Choisissez un Modèle ici)';

FCKLang.wikiUnsupportedLanguage			= 'Language non supporté: %1';

FCKLang.DplHelp				= 'DPL stands for Dynamic Page List, and allows to generate a formatted list of pages based on selection criteria. See %link for details'; FCKLang.inputboxHelp			= 'Inputbox allows to create a form for users to create new pages. The new pages edit box can be pre-loaded with any Modèle. See %link for details';

/* * MediaWiki FCKeditor plugin * * Simple Chinese (‪中文(简体)‬) language file. * @file * @ingroup Language * @author leon @ ahphs.com */ FCKLang.wikiTabEdit					= '编辑'; FCKLang.wikiTabManual				= '手动选取'; FCKLang.wikiBtnTemplate				= '插入/编辑模板'; FCKLang.wikiBtnReference			= '插入/编辑参考(Reference)'; FCKLang.wikiBtnReference			= '插入/编辑参考标记「 」'; FCKLang.wikiBtnFormula				= '插入/编辑公式'; FCKLang.wikiBtnSpecial				= '插入/编辑特别标记'; FCKLang.wikiCmdTemplate				= '模板属性'; FCKLang.wikiCmdReference			= '参考属性'; FCKLang.wikiCmdFormula				= '公式'; FCKLang.wikiCmdCategories			= '分类'; FCKLang.wikiLoadingWikitext			= '载入维基文字中,请稍等...'; FCKLang.wikiLoadingCategories		= '载入分类中...'; FCKLang.wikiSearchCategory			= '搜索分类'; FCKLang.wikiSelectedCategories		= '选择分类'; FCKLang.wikiBtnCategories			= '插入/编辑分类'; FCKLang.wikiAddNewCategory			= '新增'; FCKLang.wikiCategoryTree			= '分类树'; FCKLang.wikiMnuTemplate				= '模板属性'; FCKLang.wikiMnuMagicWord			= '修改魔术字'; FCKLang.wikiMnuReference			= '参考属性'; FCKLang.wikiMnuFormula				= '编辑公式'; FCKLang.wikiCmdSpecial				= '特殊标记属性'; FCKLang.wikiMnuSpecial				= '特殊标记属性'; FCKLang.wikiImgFileName				= '图片文件名'; FCKLang.wikiImgNotice1				= '图片必须事先完成上传'; FCKLang.wikiImgNotice2				= '使用在屏幕左侧的 "上传档案"'; FCKLang.wikiImgCaption				= '标题(Caption)'; FCKLang.wikiImgType					= '图片类型'; FCKLang.wikiImgTypeThumb			= '缩略图(Thumbnail)'; FCKLang.wikiImgTypeFrame			= '框(Frame)'; FCKLang.wikiImgTypeBorder			= '边(Border)'; FCKLang.wikiImgAlignCenter			= '居中(Center)'; FCKLang.wikiImgAutomatic			= '自动搜索结果'; FCKLang.wikiImgTooShort				= '太短了...请多输入一些内容'; FCKLang.wikiImgStartTyping			= '在上方的栏位开始输入'; FCKLang.wikiImgStopTyping			= '停止输入开始搜索'; FCKLang.wikiImgSearching			= '搜索中...'; FCKLang.wikiImgSearchNothing		= '没有找到图片'; FCKLang.wikiImgSearch1Found			= '找到1个图片'; FCKLang.wikiImgSearchSeveral		= '找到%1个图片'; FCKLang.wikiImgSearchALot			= '找到%1个图片'; FCKLang.wikiLnk						= '链接'; FCKLang.wikiLnkAutomatic			= '自动搜索结果'; FCKLang.wikiLnkNoSearchAnchor		= '锚点链接...，无搜索选项'; FCKLang.wikiLnkNoSearchMail			= '电子邮件链接，无搜索选项'; FCKLang.wikiLnkNoSearchExt			= '外部链接，无搜索选项'; FCKLang.wikiLnkTooShort				= '太短了...请多输入一些内容'; FCKLang.wikiLnkStartTyping			= '在上方的栏位开始输入'; FCKLang.wikiLnkStopTyping			= '停止输入开始搜索'; FCKLang.wikiLnkSearching			= '搜索中...'; FCKLang.wikiLnkSearchNothing		= '没有找到文章'; FCKLang.wikiLnkSearch1Found			= '找到1篇文章'; FCKLang.wikiLnkSearchSeveral		= '找到%1篇文章'; FCKLang.wikiLnkSearchALot			= '找到%1篇文章'; FCKLang.wikiTeX						= '公式 (TeX 标记)'; FCKLang.wikiTeXEmpty				= '请输入公式'; FCKLang.wikiSpTag					= '现有特殊标记(Special Tag)'; FCKLang.wikiSpParam					= '特殊标记参数'; FCKLang.wikiRef						= '参考文字(维基文字)'; FCKLang.wikiRefName					= '参考名称(选择性填写)'; FCKLang.wikiTmpl					= '模板行定义(从 )'; FCKLang.wikiTmplEmpty				= '模板必须以「」结束，请确认一下'; FCKLang.wikiTmpsel					= '(请于此处选择一个模板使用说明(template manual))';

Reporting software bugs
Bugs and issues can be reported on the MediaWiki Bugzilla (select FCKeditor as the component): https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=FCKeditor

You can find a list of known bugs (both open and fixed ones) here: https://bugzilla.wikimedia.org/buglist.cgi?component=FCKeditor&product=MediaWiki%20extensions

Ugly image for category button
I noticed that the category button image has suddenly become ugly, from older versions to newer.

You can just compare... ... and you can repair it by copying the normal one to FCKeditor/plugins/mediawiki/images --Varlin 17:50, 3 August 2011 (UTC)
 * http://www.pharmabolix.com/extensions/FCKeditor/plugins/mediawiki/images/tb_icon_category.gif
 * http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/FCKeditor/plugins/mediawiki/images/tb_icon_category.gif?view=co

Wikis using this extension

 * PHP Chinese
 * Wikimini, encyclopedia written by children
 * GrassrootsWiki - Knowledge portal for grassroots technologies in the field of humanitarian aid and development cooperation
 * NDTWiki - Wiki about Non Destructive Testing (NDT)
 * Klusopedia - A Dutch wiki for Home Improvement and DIY instructions, tips and tricks!
 * Appropedia (as of ~12 July 2009)
 * FCKEditor MediaWiki development site
 * LabVIEW Wiki
 * WoTWiki.org Wheel of Time Wiki Project site
 * [infokent.com]
 * http://www.sit.auckland.ac.nz
 * http://www.opinionpedia.net Opinions about products and services
 * http://www.lawiki.org a law student subject wiki
 * Wikia was using it, and worked on the development of it. Wikia rolled it out the 15th june 2009 according to the wikia forum entry and is used on most Wikia wikis as of 4 october 2009 (for example the Novelas wiki). The wikia WYSIWYG editor is only available for the new Monaco skin so uncyclopedia   doesn't have the new editor because they chose to keep their old monobook skin.

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