Learn how to improve editing on your wiki by enabling the MediaWiki Visual Editor.
If you are using ProWiki MediaWiki Hosting, then you can easily enable or disable the Visual Editor via the wiki admin panel. It is enabled by default.
The below guide is for those who are using basic MediaWiki.
Visual Editor Explained
MediaWiki's Visual Editor is a tool that allows users to edit pages in a What-You-See-Is-What-You-Get (WYSIWYG) interface. It is designed to make editing pages more user-friendly, especially for users who are not familiar with wikitext.
When Visual Editor is installed and enabled, users can use it to edit pages by clicking their edit link.
Visual Editor is one of the most popular MediaWiki extensions. It is used on Wikipedia and comes bundled with MediaWiki since version 1.35. See the user guide for and overview of available features and detailed usage instructions.
Enable Visual Editor
You will need to edit the LocalSettings.php configuration file. This is rather technical and requires server access.
This guide is for MediaWiki 1.35 and later.
- View the Special:Version page of your wiki, to ensure Visual Editor is not installed yet
- Start editing LocalSettings.php
- Add
wfLoadExtension( 'VisualEditor' );
to the end of the file - Save LocalSettings.php and reload your wiki. Visual Editor should now be listed on Special:Version
That's it! In modern MediaWiki installation of Visual Editor is a lot simpler than it used to be.
Apache and Subpages
If you are using the Apache webserver and use subpages on your wiki, then you need to add the following line to your top-level server configuration:
AllowEncodedSlashes NoDecode
Configure Visual Editor
Visual Editor comes with reasonable defaults. Even so, you might wish to tailor its behavior to suit your wiki and your own preferences.
You will need to edit the LocalSettings.php configuration file. This is rather technical and requires server access.
Choose Your Editing Tabs
To show only one editing tab that uses Visual Editor:
$wgVisualEditorUseSingleEditTab = true;
$wgDefaultUserOptions['visualeditor-editor'] = 'visualeditor';
$wgDefaultUserOptions['visualeditor-tabs'] = 'prefer-ve';
To show the Visual Editor tab and an Edit Source tab:
$wgDefaultUserOptions['visualeditor-editor'] = 'visualeditor';
To show both editing tabs, but use Edit Source by default:
$wgVisualEditorUseSingleEditTab = true;
$wgDefaultUserOptions['visualeditor-editor'] = 'wikitext';
$wgDefaultUserOptions['visualeditor-tabs'] = 'prefer-wt';
Disable Visual Editor Preferences
By default users can choose to disable visual editor for themselves via their user preferences. You can prevent them from doing that with:
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgHiddenPrefs[] = 'visualeditor-betatempdisable';
$wgHiddenPrefs[] = 'visualeditor-tabs';
Visual Editor for Anonymous Users
This setting only makes sense if you have an open wiki that allows editing by people without an account.
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";