Open main menu


MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: beta
WYSIWYG editor screenshot.png
Implementation Page action , Extended syntax , User rights , Skin , Ajax
Description Allows the easy insertion and enhanced editing of formatted data like tables, headings, enumerations etc. while they are displayed exactly like the final output.
Author(s) ontoprise GmbH, MediaWiki community of WYSIWYG
Latest version #1: 1.7.0
#6: 1.5.6_0
MediaWiki #1: 1.16.x and
1.17.x only

#2-#6: 1.18+
Patched versions of wysiwyg provided by users for MW >= 1.18, see download section
Database changes No
License GNU Lesser General Public License 2.1 or later
Download Latest updated version of #6 bundle is in Github. See details in  the download section
Translate the WYSIWYG extension if it is available at
Check usage and version matrix.

The WYSIWYG extension provides more intuitive page editing on a MediaWiki-based site. When this extension is installed, the tab 'Edit' in the command bar on top of every page leads directly in the WYSIWYG editing mode.

Warning Warning: Be sure that you check the dependencies for this extensions. There may be combinations that fail.


Features of the WYSIWYG extensionEdit

The WYSIWYG extension enables editing of page of wiki using integrated graphical user interface of CKeditor.

Sample screen of WYSIWYG- editor


WYSIWYG (dependencies, download, help)
Version from WYSIWYG.php Source

1.6.0_0 [B8]
3.5 MB

1.6.0-0 (1.1.2011) ....


3.5 MB

1.7.0-1 (4.6.2012) ....


"WYSIWYG" repository (18.8.2014), mirror in github repository: "wikimedia/mediawiki-extensions-WYSIWYG")





1.5.6_0 [B551]
2.5MB (15.3.2012).... User made (experimental)


1.5.6_0 [B551] (18.2.2013)...

User patched (PHP 5.4.8 compatible): almost identical to contents of #x.3, some SMWHalo part removed.




"CKEditor in MediaWiki" repository (9.4.2014): Ciges/CKEditor_in_MediaWiki

User made (beta). Patched versions of WikiEditor and WYSIWYG working together. Tested with 1.20.7 and 1.20.8 MediaWiki versions





1.5.6_0 [B551] (18.2.2013) ... (bundle is for MW1.20.2, same as #x.4 above))

For MediaWiki 1.21.1 make manually following modifications with it:

Patch #1 Remove (or comment) the two lines that contains wfLoadExtensionMessages( 'CKeditor' ); (probably line 345 and 532) in WYSIWYG/CKeditor.body.php and use these settings: Thread:Extension talk:WYSIWYG/Yes: Working with MW-1.21+ with some settings.

Patch #2: Fix one line in WYSIWYG/CKeditorLinker.php to prevent 404/Forbidden error when hitting CANCEL:


1.5.6_0 [B551] (16.12.2013) ...

Works on MediaWiki 1.22.0.

User patched: Tested with IE10 and Chrome, Apache/PHP 5.5.3.

IE10, Chrome


1.5.6_0 [B551] (obsolete)


fork of #6 bundle below (13.1.2014).... is based on

1.21.2, 1.22, 1.23, 1.24 [1], 1.25[2], 1.26, 1.27, 1.28, 1.29, 1.30, 1.31[3]
5.4.22 5.5.6 5.5.15 7.2.5
5.5.33 5.6.14 5.6.20 10.1.32
1.5.6_0 [B551+18.09.2018]
WYSIWYG-CKeditor [4] repository:

Mediawiki-wysiwyg/WYSIWYG-CKeditor. Based on #3, #4 and partly on #5. Includes additional modifications [5].

IE8[6], IE11[7], FireFox [8], Chrome [9]


  1. Check Github#23(>= Version 1.5.6_0 [B551+01.09.2015]).
  2. <=MW1.25 branch: CKeditor_v45, also branch: wysiwyg_mw127 may work, please test it.
  3. Branch wysiwyg_mv130_462 contains latest modifications, version 1.5.6_0 [B551+18.09.2018].
  4. There may be more than one branches available for #6 bundle which is stored in github. If you like to contribute to it, you should clone the repository of #6 in github, create new branch there for fix and finally create pull request with it, pull request will make it possible to merge patch into #6 bundle.
  5. Short list of improvements is below. For more details, see here:
  6. IE7 is not compatible, IE browsers (IE8,9,10,11) should not have any compatible settings on for your wiki site.
  7. #6 bundle of wysiwyg should be used with IE11 native mode ("Edge"), compatibility view mode should not be enabled with IE11 for your wiki site (setting is located here: "Tools=>Compatibility View settings", deselect option "Display intranet sites in compatibility view" in case your wiki is internal or remove site name from the list).
  8. FireFox v26.x - v56.x
  9. Chrome v.32.x - v.62.x


WYSIWYG of #6 bundle (see Download- section), MW >= 1.23Edit

  • Download WYSIWYG in your <wiki installation directory>/extensions/WYSIWYG-src directory and publish its sub-directories as wiki extensions, still keeping the original WikiEditor extension (if any). For example:
    cd wiki/extensions/
    git clone WYSIWYG-src
    ln -s WYSIWYG-src/SemanticForms SemanticForms
    mv WikiEditor WikiEditor-org
    ln -s WYSIWYG-src/WikiEditor WikiEditor
  • Activate WYSIWYG by adding following lines valid to your system at the bottom of your LocalSettings.php:
#Default user options:
$wgDefaultUserOptions['riched_disable']               = false;
$wgDefaultUserOptions['riched_start_disabled']        = false;
$wgDefaultUserOptions['riched_use_toggle']            = true; 
$wgDefaultUserOptions['riched_use_popup']             = false;
$wgDefaultUserOptions['riched_toggle_remember_state'] = true;
$wgDefaultUserOptions['riched_link_paste_text']       = true;

//MW<=1.24 or versions of WYSIWYG <= "1.5.6_0 [B551++01.07.2016]"
require_once "$IP/extensions/WYSIWYG/WYSIWYG.php"; 

//MW>=1.25 and versions of WYSIWYG >= "1.5.6_0 [B551+02.07.2016]"
wfLoadExtension( 'WYSIWYG' );

//MW>=1.25 and versions of WYSIWYG >= "1.5.6_0 [B551+02.07.2016]" has dependency
//to module of WikiEditor so it must be enabled too (or otherwise file
//extension.json has to be edited manually to remove dependency)
wfLoadExtension( 'WikiEditor' );

Wikitext mode: toggle- link and WikiEditorEdit

WikiEditor which comes with bundle #6 works with MW>=1.25. If you have other versions of MW and WikiEditor add following lines into these two files:

  • In file LocalSettings.php:
 #Use this only with MW<=1.24: tells WYSIWYG that text based editor is WikiEditor
 $wgCKEditorWikiEditorActive = true;
  • In file extensions/WikiEditor/modules/ext.wikiEditor.toolbar.js (add the following lines at the end of the file just before the "} );" characters.:
  if ( mw.config.get('useWikiEditor') ) {
    if ( mw.config.get('showFCKEditor') & mw.config.get('RTE_VISIBLE') ) 
      { $('#wikiEditor-ui-toolbar').hide(); }
      { $('#wikiEditor-ui-toolbar').show(); }

For more information about additional settings of LocalSettings.php etc. with MW>=1.22 and #6 bundle, see (on GitHub -page).


Customize the toolbarEdit

Everything is explained here.

Disable for some namespacesEdit

To disable WYSIWYG for some namespaces (for example, here MediaWiki), add the following code in your LocalSettings.php :

$wgFCKEditorExcludedNamespaces = array(NS_MEDIAWIKI);

To set default preferences while letting users chose to use WYSIWYG on certain namespaces :


To hide from preferences the checkboxes relative to the namespaces, comment these lines.

Style the content of the editorEdit

Two solutions :

  1. Edit the file ckeditor/contents.css
  2. Point to the css file of your choice, adding this line to ckeditor/config.js :
  config.contentsCss = 'path/to/your/file.css';

Config "Paste as ..."Edit

When clicking "Paste as..." button under Firefox, you may get a popup telling your browser can't access your clipboard. This is a security protection, but you can configure your browser so that it makes an exception for your wiki. Thus, you will be able to paste in one click, with no need to paste in the dialog field and then validate. See here. It seems no longer possible.

Cleaning some tagsEdit

CKeditor functions AllowedContent and DisallowedContent are supposed to do that, but do not work (TEST: these should should work with branch wysiwyg_mw127_459, Version 1.5.6_0 [B551+14.07.2016]).

You can add some regexp to play this role. For example, if you don't want to allow color styles, you can add here the following lines :

data = data.replace(/\bcolor:[^;"']*;?/gi,  );

Remove advanced tab in table dialogEdit

Add these lines in config.js : (included in #6 bundle >= Version 1.5.6_0 [B551+11.06.2016])

CKEDITOR.on( 'dialogDefinition', function( ev ) {
    var dialogName =;
    var dialogDefinition =;
    if((dialogName=='table')||(dialogName=='tableProperties')) { dialogDefinition.removeContents('advanced'); }        

Change default values in table dialogEdit

For instance you can change the width default to 100% by replacing, in this file, the two 500 with "100%"


Modifications (#5 and #6 refer to Download section above)

  • Buttons to create a references (footnotes): <ref>...</ref> and <reference/> (incl. in #5 and #6)
  • Show references in wysiwyg editing mode as text (Version 1.5.6_0 [B551+08.07.2016]). Show them as "widgets" which can be dragged and dropped (branch wysiwyg_mw127_459, Version 1.5.6_0 [B551+20.07.2016].).
  • Edit text of references also in (footnotes) references- section.
  • Fixed Images dialog (parameters) (incl. in #5 and #6)
  • Button to add [[...]] in one click in order to convert text as target link (incl. in #5 and with additional modifications in #6)
  • Autofilling of the link dialog with selected text, and autosearch] (incl. in #5 and with additional modifications in #6)
  • Dialog to handle categories. Category dialog supporting hierarchical categories #6.
  • Display category name in WYSIWYG beside the "C" icon (patch here, included and further modified here Version 1.5.6_0 [B551+01.09.2015]) (screenshot here)(thread here).
  • [// wikipedia] is considered as external link (incl. in #6)
  • <math> tags are not deleted anymore. Math -tags, gallery- and hovergallery- tags (HoverGallery ext.), poll- and ajaxpoll- tags (poll- and ajaxpoll ext.) as well as contents of all other unknown mediawiki tags should now be possible to enter/update using tag -dialog of wysiwyg (incl. in #6)
  • Edit text with paragraph format "Formatted" (pre- and syntaxhighlight -tags) directly as text in wysiwyg mode (skip using special -dialog). #6 Version 1.5.6_0 [B551+01.09.2015]). (Github#50, test version in branch CKeditor_v4_Nowiki-Synt-Pre)
  • Use of resourceloader (forced with MW 1.26.xx) of MW (branch wysiwyg_mw126_rsl458 is using WYSIWYG.php, branch wysiwyg_mw127 is using wfLoadExtension)
  • Button to format selected text with format "italic+angle quotes".

Possible customizationsEdit

  • Disable search for images in link dialog (incl. in #5) Question: Is this necessary modification? You can already now specify namespace as search criteria in link dialog using ":", f.ex. keying in "image:eifel" (without quotes) will search only image names starting with string "eifel". Other namespaces works similarly. Answer: Personaly, I don't use [[Media:<link>]], and I don't want images to appear in the search list of link dialog.
  • Hide checkbox "Open rich editor in a popup" in Special:Preferences : comment these lines (included inbranch wysiwyg_mw127_459, versions >= 1.5.6_0 [B551+14.07.2016].)
  • Tables :
    • summary attribute is not supported anymore in HTML5, and is of little use. I suggest to remove it
  • Remove infotip displayed on editor in wikitext view : see here Solved:No need to edit core files of CKeditor, included in versions >=1.5.6_0 [B551+21.07.2016], branch wysiwyg_mw127_459
  • Image dialog enhancement (patch here) :
    • Add a button in dialog to reset to default size
    • Add a button in dialog to lock size ratio
    • Display image size by default in the dialog width/height input
    • if you type exactly the file name in the input, the image preview is loaded instantly (no need to click on the ImgList)
    • if you tick upright checkbox, the fields height and width are cleared
  • Fix a Firefox line wrap bug (patch)(thread) Fixed:This is not anymore an issue after upgrading CKeditor in versions >=1.5.6_0 [B551+07.07.2015]
  • In the image dialog, fit image preview and remove scrollbars with this css :
.ImagePreviewBox img { max-height: 200px;  max-width: 300px; }
.ImagePreviewBox { overflow: unset!important; }
  • Implement Footnotes (ckeditor addon) to handle footnotes with WYSIWYG. QUESTION: Is this really needed? ...because there is Cite- extension of MW available and WYSIWYG supports it using <ref>- and <references>- tags). Ref- and References- elements can now be dragged and dropped in editor (branch wysiwyg_mw127_459, versions >= 1.5.6_0 [B551+21.07.2016]).
  • Make AllowedContent and DisallowedContent work. TEST: After removing custom dataprocessor definiton of Wysiwyg ACF should now work with branch wysiwyg_mw127_459, versions >= 1.5.6_0 [B551+21.07.2016]. At this moment all kind of content is allowed by setting "config.allowedContent = true;" of config.js.


  • Ability to pick up available templates in a list (like old fckeditor)
  • Images :

Known incompatibilitiesEdit

  • FileLink extension does not work with wysiwyg extension.
  • Issues with Preloader extension (#6)
    • When loading a template from Preloader, formatting may be stripped from header and thematic break tags. For example, <h3 style="font-size:16pt; font-weight=bolder; color=purple;">Title</h3> and <hr style="color:purple; width=50%; align=center;"> return only plain, black === Title === and ----, with no formatting. It is unknown whether this issue occurs with other tags, but appears likely. Github#27

Development RepositoriesEdit

If anyone is interested in developing the extension further, there are three known repositories created by users:

See the discussion/talk page to get in touch with the owners of these repositories.