Extension:VisualEditor
VisualEditor Release status: beta | |||
---|---|---|---|
![]() | |||
Implementation | Page action, Extended syntax, Beta Feature, Skin | ||
Description | Allows for editing pages as rich content | ||
Latest version | continuous updates | ||
Compatibility policy | release branches | ||
MediaWiki | 1.32-alpha | ||
Database changes | No | ||
License | MIT License | ||
Download | README | ||
| |||
Check usage and version matrix. | |||
Open tasks · Report a bug |
The VisualEditor extension allows for editing pages as rich content. There is also a project of the same name aiming to create a reliable rich-text editor for the Web and for MediaWiki.
The VisualEditor extension relies on the separate nodeJS-based Parsoid parser service that needs to be installed and enabled in order to edit pages with it.
Contents
- 1 User guide
- 2 Download
- 3 Skin compatibility
- 4 Setting up VisualEditor
- 5 Complete list of configuration options
- 6 Integration of "2017 wikitext editor"
- 7 Troubleshooting
- 8 References
User guide[edit]
See Help:VisualEditor/User guide.
Download[edit]
For the General User: If you're using the latest stable version of MediaWiki you will need to download the VisualEditor-MediaWiki extension from the ExtensionDistributor page.
For the Advanced User:
The following download instructions are for use with the latest nightly build of MediaWiki only.
cd extensions git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VisualEditor.git cd VisualEditor git submodule update --init
Note:
- VisualEditor-MediaWiki's master branch contains the latest code, as used at Wikimedia. This code is potentially slightly buggy or unstable, but is likely to have fewer bugs and more features than old builds.
- The master branch requires alpha builds of MediaWiki (currently, 1.31-wmf.20) and will not work with the older, official releases of MediaWiki like 1.30.0; for that, use the
REL1_30
branch (command:git clone -b REL1_30 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VisualEditor.git
). - The
git submodule update --init
command is vital, as MediaWiki-VisualEditor needs the core VisualEditor submodule to work. If you do not use this command, VisualEditor will fail to work.
If you cannot use git (e.g. you are in an air-gapped installation), you can download a snapshot of VisualEditor-MediaWiki for master or for a release version of MediaWiki from the ExtensionDistributor page. After you've got the code, save it into the extensions/VisualEditor directory of your wiki.
Skin compatibility[edit]
MediaWiki version: | ≤ 1.28 |
VisualEditor is known to be compatible with the following skins:
- Vector
- MonoBook
- Apex
- Minerva Neue
- Minerva (was part of MobileFrontend)
Other skins are not officially supported, but it should be compatible with any skin that uses the required HTML structure – see VisualEditor/Skin requirements. Some fiddling with skin stylesheets might be necessary to make everything look nice. It will load on any skin if it matches the feature detection.
Setting up VisualEditor[edit]
Set up a Parsoid service[edit]
If you want to be able to edit existing pages and save pages with VisualEditor you need a Parsoid service that converts between wikitext and the HTML that VisualEditor displays for editing.
To set up your own Parsoid service follow the Parsoid installation instructions before setting up VisualEditor. Note that it can be particularly complicated to set up Parsoid and Node.js in non-standard systems, like those running Windows or Debian.
Basic configuration for MediaWiki-VisualEditor[edit]
By default, MediaWiki-VisualEditor does not enable itself for users. To make it available, add the following lines to your wiki's LocalSettings.php
after you have downloaded the extension:
wfLoadExtension( 'VisualEditor' );
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Optional: Set VisualEditor as the default for anonymous users
// otherwise they will have to switch to VE
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
Note that you can do this before you have installed the Parsoid node.js service to experiment with VE; this will mean that you can try the editor out in 'create' mode on your own wiki, but you will not be able to save or edit existing pages.
Other extensions which load plugins for VE (e.g. Math) can be loaded before or after VE if you are using MediaWiki 1.25 or later; the plugins should work either way.
Changing active namespaces[edit]
Per default, the VisualEditor is only enabled for the namespaces "Main", "User", "File" and "Category". It is however possible to add or remove namespaces. There are many ways to do this but it is recommended to use the canonical names defined for the respective namespaces. Note that this is different to MediaWiki core and nearly all extensions.
- Removing a namespace (e.g. "File")
$wgVisualEditorAvailableNamespaces = [
"File" => false
];
- Adding a namespace (e.g. "Help" and "Extra" which is an custom one)
$wgVisualEditorAvailableNamespaces = [
"Help" => true,
"Extra" => true
];
- Adding and removing a namespace (e.g. "File" and "Extra" which is an custom one)
$wgVisualEditorAvailableNamespaces = [
"File" => false,
"Extra" => true
];
Linking with Parsoid[edit]
To get VisualEditor to talk to Parsoid, add the following code to your LocalSettings.php
to specify your Parsoid instance:
$wgVirtualRestConfig['modules']['parsoid'] = array(
// URL to the Parsoid instance
// Use port 8142 if you use the Debian package
'url' => 'http://localhost:8000',
// Parsoid "domain", see below (optional)
'domain' => 'localhost',
// Parsoid "prefix", see below (optional)
'prefix' => 'localhost'
);
A single Parsoid server can handle multiple wikis. The Parsoid domain
setting identifies your wiki configuration to Parsoid. Whether you set domain
explicitly or optionally accept the default value, the value from $wgVirtualRestConfig
must match the value from Parsoid's config.yaml
. By default it is set to the hostname named by $wgCanonicalServer
, but you can pick an arbitrary string. Older versions of Parsoid also used a unique "prefix" to identify the server; you may need to list that here as well.
Parsoid must have been configured to match, for example with the following in Parsoid's config.yaml
:
mwApis:
- # This is the only required parameter,
# the URL of you MediaWiki API endpoint.
uri: 'http://path/to/my/wiki/api.php'
domain: 'localhost'
- # and another MediaWiki
uri: 'http://path/to/my/otherwiki/api.php'
domain: 'uniqueidentifier'
If you are using Parsoid older than 0.6.0, you would use a line in Parsoid's localsettings.js
like:
parsoidConfig.setMwApi({ uri: 'http://path/to/my/wiki/api.php', domain: 'localhost', prefix: 'localhost' });
Again, the "domain" property is optional in the Parsoid configuration; it defaults to the hostname used in the uri
property if not specified. The "prefix" property can also be omitted unless you are running a very old version of Parsoid.
See Parsoid/Setup#Configuration for more details.
Switching between Wikitext Editing and VisualEditor[edit]
![]() | Do not install RESTBase on a private wiki! RESTBase currently cannot be configured to keep page content private but will make all pages content publicly accessable. |
VisualEditor allows you to switch back and forth between wikitext editing and VisualEditor. However, without a RESTBase server, when you try to switch from a wikitext editing environment into VisualEditor, your only options are Cancel or Discard my changes and switch; any changes you made will be discarded if you switch.[1] If you want the ability to switch between wikitext editing and VisualEditor and save your changes, you must install a RESTBase server.
To set up your own RESTBase service follow the RESTBase installation instructions. Note that if you were successful setting up the Parsoid service, setting up a RESTBase server is similar because it also runs under Node.js.
For VisualEditor you do not need the configuration section in config.yaml
described in the RESTBase configuration section.
Once the RESTBase server is operational, add the following code to your LocalSettings.php
:
$wgVirtualRestConfig['modules']['restbase'] = [
'url' => "http://yourRESTBaseserver.com:7231",
'domain' => '{domain}',
'parsoidCompat' => false
];
$wgVisualEditorFullRestbaseURL = 'http://yourRESTBaseserver.com:7231/{domain}/';
where {domain}
is the value of 'domain'
you specified in your Parsoid configuration file (you should change it in the configuration). Make sure that the port you specify here (e.g. :7231
) is the same port as you specified in the RESTBase configuration.
If you can't access RESTBase port(e.g.:7231
), you can bypass via httpd proxy. refer IF Restbase Port is blocked. If your wiki is served through HTTPS, RESTBase must be served through HTTPS; else users could experience "mixed-content" errors and the switch from wikitext to VisualEditor could not work.
Now when you make changes in a wikitext editor, you are presented with a dialog box with a Switch option instead of Discard my changes and switch.
Servers with multiple virtual sites[edit]
If Apache2 is configured with multiple virtual sites, Parsoid is (in standard configuration) only able to access the default site. To check for this problem, run curl '[http://your-wiki-base-url]/api.php'
on the server.
If the response starts with:
<!DOCTYPE html><html lang="en-GB" dir="ltr" class="client-nojs"><head><meta charset="UTF-8" /><title>MediaWiki API help - ['''''Name of your wiki''''']</title>
then you don't have the problem, but if it doesn't, you may need to configure a host alias that Parsoid can use:
Look at the apache2 configuration file for the virtual server hosting the wiki, near the top of the file there should be la line like:
<VirtualHost *:80>
If the '*' is present, then the alias can be to localhost, if there is an IP address replacing the '*' then the alias must be to that IP address.
In the same file add a line:
ServerAlias my_wiki_alias
In the hosts file of the server, add a route for my_wiki_alias, either for 127.0.0.1 (if the apache2 virtual server configuration had the '*' above, else to the IP address from the apache2 virtual server configuration.
Finally, in the Parsoid localsettings.js
file, find the parsoidConfig.setMwApi
setting, and set it to:
parsoidConfig.setMwApi({
uri: 'http://my_wiki_alias:80/path-to-my-wiki/api.php',
domain: '/* my Parsoid "domain" matching the value in LocalSettings.php */',
prefix: '/* my Parsoid "prefix" matching the value in LocalSettings.php */'
});
Reload the network config, apache config and Parsoid config, and retest the curl command above.
The same method works for multiple wikis hosted on multiple virtual servers on a host (use a different alias and add a parsoidConfig.setMwApi
setting for each wiki).
Linking with Parsoid in private wikis[edit]
Try these three things:
Forwarding Cookies to Parsoid[edit]
// This feature requires a non-locking session store. The default session store will not work and
// will cause deadlocks (connection timeouts from Parsoid) when trying to use this feature.
$wgSessionsInObjectCache = true;
// Forward users' Cookie: headers to Parsoid. Required for private wikis (login required to read).
// If the wiki is not private (i.e. $wgGroupPermissions['*']['read'] is true) this configuration
// variable will be ignored.
//
// WARNING: ONLY enable this on private wikis and ONLY IF you understand the SECURITY IMPLICATIONS
// of sending Cookie headers to Parsoid over HTTP. For security reasons, it is strongly recommended
// that $wgVirtualRestConfig['modules']['parsoid']['url'] be pointed to localhost if this setting is enabled.
$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;
Warning: ONLY enable this on private wikis and ONLY IF you understand the SECURITY IMPLICATIONS of sending Cookie headers to Parsoid over HTTP! (but see the HTTPS section below)
Parsoid Authentication Without Forwarding Cookies[edit]
An alternative to the approach above is explicitly giving read permissions to requests from the parsoid server. There are two suggested solutions:
Note: Replace 127.0.0.1 in both example solutions with the IP address of the server that is running Parsoid. This should of course only be done if the Parsoid server is on a 'trusted' network.
- 1) Using the NetworkAuth extension
The forwarding of cookies (and the enabling of $wgSessionsInObjectCache
and the forwardCookies
property) can be avoided by adding a user (which may be called parsoid
) to the wiki and then add the NetworkAuth extension to the wiki with the configuration in "LocalSettings.php" file:
require_once "$IP/extensions/NetworkAuth/NetworkAuth.php";
$wgNetworkAuthUsers[] = [
'iprange' => [ '127.0.0.1' ],
'user' => 'parsoid'
];
Where the IP address matches that of the Parsoid server and the user matches the one you added to the wiki.
- 2) Adapt how permissions are set
After your settings for $wgGroupPermissions
add the following to your "LocalSettings.php":
if ( !isset( $_SERVER['REMOTE_ADDR'] ) OR $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ) {
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = true;
}
Where the IP address matches that of the Parsoid server. Solution as mentioned in: explicitly remove restrictions for Parsoid by IP address.
Parsoid over HTTPS[edit]
By default, Parsoid only supports HTTP connections. However, it's easy to provide HTTPS Parsoid by using Stunnel, a utility which offers SSL wrapping for arbitrary sockets. Most Unix distributions have 'stunnel' or 'stunnel4' package available from the repository. The following config file shard (e.g. /etc/stunnel/parsoid.conf) should do the trick:
cert = /etc/ssl/my_certs/parsoid.crt
key = /etc/ssl/my_keys/mykey.key
CAfile = /etc/ssl/my_ca/ca.crt
[parsoid]
accept = 8143
connect = 8142
If you are using Let's Encrypt, you can use the following (replacing `<domain>` with the primary URL you have the certificate for):
cert = /etc/letsencrypt/live/<domain>/fullchain.pem
key = /etc/letsencrypt/live/<domain>/privkey.pem
[parsoid]
accept = 8143
connect = 8142
Where [parsoid] is a new subdomain which is created. Once this is working, you can use the appropriate URL (e.g. 'https://parsoid.mydomain.com:8143') in your MediaWiki configuration for VisualEditor. You can use an existing subdomain (e.g. [wiki] if it's listed in your .crt
file and then the appropriate URL will become: https://wiki.mydomain.com:8143).
- You cannot use this type of configuration with Parsoid accessible via 'localhost', because the certificate chain for localhost, which will almost certainly be self-signed, will fail validation. You must use a proper hostname for Parsoid server, with appropriately issued and signed SSL certificate.
- You might enable SSL tunnels for stunnel. See e.g. for Debian /etc/default/stunnel4
Setting up such a configuration allows you to avoid the security implications of transmitting parsoid cookies in cleartext.
Producing and installing SSL certificates is beyond the scope of this document.
Parsoid on Windows and other systems[edit]
It is particularly complicated and time consuming to set up VisualEditor with Parsoid in non-standard systems, like those running Windows or non-standard Linux - those difficulties might even prevent the successful installation of VisualEditor for some people on some platforms:
- Grrrr Debian assumptions
- Can not get VisualEditor extension for MediaWiki REL1 23 working on freshly installed system
- task T68519
- etc.
[edit]
See VisualEditor/Installation on a shared host
Quick configuration guide[edit]
Feature | Beta Features opt-in state | Enabled for all to opt-in | Enabled for all to opt-out | Enabled for all without opt-out |
---|---|---|---|---|
Visual mode | Out-of-the box. | $wgDefaultUserOptions['visualeditor-autodisable'] = true;
|
$wgDefaultUserOptions['visualeditor-enable'] = 1;
|
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgHiddenPrefs[] = 'visualeditor-enable';
|
Wikitext mode | $wgVisualEditorEnableWikitextBetaFeature = true;
|
$wgVisualEditorEnableWikitext = true;
|
$wgVisualEditorEnableWikitext = true;
$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;
|
$wgVisualEditorEnableWikitext = true;
$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;
$wgHiddenPrefs[] = 'visualeditor-newwikitext';
|
Single edit tab | Not a supported configuration. | $wgVisualEditorUseSingleEditTab = true;
$wgDefaultUserOptions['visualeditor-tabs'] = 'multi-tab';
|
$wgVisualEditorUseSingleEditTab = true;
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
|
$wgVisualEditorUseSingleEditTab = true;
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
$wgHiddenPrefs[] = 'visualeditor-tabs';
|
Visual diffs on history pages | $wgVisualEditorEnableDiffPageBetaFeature = true;
|
Configuration not currently supported. | $wgVisualEditorEnableWikitext = true;
$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;
|
$wgVisualEditorEnableDiffPage = true;
|
Complete list of configuration options[edit]
Each configuration option is shown without the $wgVisualEditor
prefix for brevity.
Option | Default value | Useful for… | Documentation | ||
---|---|---|---|---|---|
VisualEditorPluginModules
|
[]
|
Extension developers | Array of ResourceLoader module names (strings) that should be loaded when VisualEditor is loaded. Other extensions that extend VisualEditor should add to this array.
| ||
VisualEditorPreloadModules
|
[
"site",
"user"
]
|
Extension developers | Array of ResourceLoader module names (strings) that should be loaded before VisualEditor is loaded. Other extensions that extend VisualEditor and need to set up their environment before loading should add to this array.
| ||
VisualEditorPreferenceModules
|
{
"visualeditor-enable-experimental": "ext.visualEditor.experimental"
}
|
Extension developers | Associative array of ResourceLoader module names (strings) that should be loaded when VisualEditor is loaded if the current user has a preference set. Other extensions that extend VisualEditor should add to this array if they want their addition to be opt-in or opt-out. Keys are preference names, values are ResourceLoader module names.
Remember to also set defaults in | ||
VisualEditorRestbaseURL
|
false
|
Sysadmins | URL to use to access the main RESTbase call. The page name will be appended directly to this value, so this needs to be set to something like 'https://en.wikipedia.org/api/rest_v1/page/html/ ' including the trailing slash.
If this is set, the page HTML will be requested from RESTbase. If this is not set, the page HTML will be requested from the API, which will send an HTTP request to Parsoid or to RESTbase if available. | ||
VisualEditorFullRestbaseURL
|
false
|
Sysadmins | URL to use to access the rest of RESTbase. The page name will be appended directly to this value, so this needs to be set to something like 'https://en.wikipedia.org/api/rest_ ' excluding the trailing slash.
| ||
VisualEditorSerializationCacheTimeout
|
3600
|
Sysadmins | Serialization cache timeout, in seconds | ||
VisualEditorAvailableNamespaces
|
[
"User" => true,
"File" => true,
"Category" => true,
"_merge_strategy" => "array_plus"
]
|
Sysadmins | Namespaces in which to enable VisualEditor (mapped from namespace canonical name to a boolean flag), on top of $wgContentNamespaces .
| ||
VisualEditorAvailableContentModels
|
[
"wikitext" => "article",
"_merge_strategy" => "array_plus"
]
|
Extension developers | Content models in which to enable VisualEditor (mapped from content model name to a boolean flag). | ||
VisualEditorUseChangeTagging
|
true
|
Sysadmins | Whether to put a change tag on every edit made with VisualEditor. | ||
VisualEditorEnableWikitext
|
false
|
Sysadmins | Whether to enable the wikitext source mode inside VisualEditor. | ||
VisualEditorEnableDiffPage
|
false
|
Sysadmins | ??? | ||
VisualEditorEnableDiffPageBetaFeature
|
false
|
Sysadmins | ??? | ||
VisualEditorUseSingleEditTab
|
false
|
Sysadmins | Whether to use only one edit tab, switching back and forth, or add a dedicated VisualEditor edit tab next to the existing one.
Note that the bi-directional switching functionality requires RESTbase installation rather than talking directly to Parsoid. | ||
VisualEditorSingleEditTabSwitchTime
|
20160101000000
|
Sysadmins | From what timestamp to warn existing editors that the installation has switched from two edit tabs to one. In general you should ignore this. | ||
VisualEditorTabPosition
|
'before'
|
Sysadmins | If showing two edit tabs, where to put the VisualEditor edit tab in relation to the system (or WikiEditor) one:
| ||
VisualEditorTabMessages
|
{
"edit": null,
"editsource": "visualeditor-ca-editsource",
"create": null,
"createsource": "visualeditor-ca-createsource",
"editlocaldescriptionsource": "visualeditor-ca-editlocaldescriptionsource",
"createlocaldescriptionsource": "visualeditor-ca-createlocaldescriptionsource",
"editsection": null,
"editsectionsource": "visualeditor-ca-editsource-section"
}
|
Sysadmins | Configuration of what messages to use for the various kinds of edit tab users can see, if showing two edit tabs:
'edit' – i18n message key to use for the VisualEditor edit tab; if 'editsource' – i18n message key to use for the old edit tab; if 'create' – i18n message key to use for the VisualEditor create tab; if 'createsource' – i18n message key to use for the old create tab; if 'editlocaldescriptionsource' – i18n message key to use for the old edit tab on pages for files in foreign repos; if 'createlocaldescriptionsource' – i18n message key to use for the old create tab on pages for files in foreign repos; if 'editsection' – i18n message key to use for the VisualEditor section edit link; if 'editsectionsource' – i18n message key to use for the source section edit link; if | ||
VisualEditorAutoAccountEnable
|
false
|
Sysadmins | Whether to enable VisualEditor for every new account.
This allows you to keep the ' | ||
VisualEditorDisableForAnons
|
false
|
Sysadmins | Whether to disable VisualEditor for non-logged-in users
This allows you to enable the ' | ||
VisualEditorTransitionDefault
|
false
|
Sysadmins | For wikis planning to use the 'visualeditor-betatempdisable ' preference to auto-opt-out existing users whilst enabling by default for all existing users, whether to start recording explicit opt-outs against implicit ones.
| ||
VisualEditorShowBetaWelcome
|
true
|
Sysadmins | Whether to show the "welcome to the beta" dialog the first time a user uses VisualEditor | ||
VisualEditorNewAccountEnableProportion
|
false
|
Sysadmins running user analytics | Whether to enable VisualEditor for a proportion (Egyptian fraction) of all new accounts based on userID. | ||
VisualEditorFeedbackTitle
|
false
|
Sysadmins | Whether to enable the MediaWiki feedback tool inside the help menu of VisualEditor. If enabled, the title of the page at which to point the MediaWiki feedback tool. | ||
VisualEditorFeedbackAPIURL
|
false
|
Sysadmins | If set, the API of the remote wiki at which to point the MediaWiki feedback tool. | ||
VisualEditorSkinToolbarScrollOffset
|
[]
|
Skin developers | An array of skin names mapped to pixel values to which to set the toolbar scroll offsets. | ||
VisualEditorBrowserBlacklist
|
{
"firefox": [
[
"<=",
11
]
],
"safari": [
[
"<=",
6
]
],
"opera": [
[
"<",
12
]
],
"msie": [
[
"<",
10
]
]
}
|
VisualEditor developers | List of browsers with which VisualEditor is incompatible. See jquery.Client for specification. If the user's browser is matched, VisualEditor will refuse to load.
Firefox – There is a wikilink corruption ( Safari – Older versions of Safari suffered from corruption issues from various old browser plugins. Opera – Below version 12, Opera was untested, and as its user base is almost non-existent anyway it's blocked. Internet Explorer – At or below version 9, there are various incompatibilities in layout and feature support. Versions 10 and 11 should work correctly. Not listed independently, because it's inherited from MediaWiki itself, Android at 3.x and below "support" CE but don't trigger keyboard input or have other issues, making it useless for users. | ||
VisualEditorEnableTocWidget
|
false
|
VisualEditor developers | Whether to enable the (currently experimental) Table Of Contents widget | ||
VisualEditorRebaserURL
|
false
|
VisualEditor developers | URL to use to access the experimental rebaser technology. If false, the technology isn't loaded. |
Old configuration parameters[edit]
![]() | These parameters are no more used in recent versions of VisualEditor; they are documented here for compatibility purposes with the proposed upgrade paths. |
As above, each configuration option is shown without the $wgVisualEditor
prefix for brevity.
Option | MW versions | Default value | Documentation |
---|---|---|---|
Namespaces
|
1.22–1.25 |
|
List of namespaces IDs where is the VisualEditor is activated.
This parameter has been essentially replaced by |
SupportedSkins
|
1.22–1.28 | [
"vector",
"apex",
"monobook",
"minerva",
"blueprint"
]
|
List of skins VisualEditor integration supports. If the user's skin is not matched, VisualEditor will refuse to load.
This is replaced by a dynamical check of the requirements (T161373). |
Integration of "2017 wikitext editor"[edit]
Since release branch "REL1_29" (MediaWiki 1.29 and later) it is also possible to activate the so called "2017 wikitext editor". To enable it and at the same time make it available to all users by default add the following to your "LocalSettings.php" file:
$wgVisualEditorEnableWikitext = true;
$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;
$wgHiddenPrefs[] = 'visualeditor-newwikitext';
If you want all users to have the 2017 wikitext editor available as a beta feature, i.e. leave the choice to the users, install the BetaFeatures extension add the following to your "LocalSettings.php" file:
$wgVisualEditorEnableWikitext = true;
- Enabling wikitext syntax highlighting
It is also possible to enable wikitext syntax highlighting for the "2017 wikitext editor". To do this you have to additionally install the CodeMirror extension.
Troubleshooting[edit]
- Error loading data from server: HTTP 500. Would you like to retry?
- Usually for new installs, this is due to "curl", "php5-curl", or "php7.0-curl" not being installed on your server.
- Or perhaps your setMwApi uri is set incorrectly with e.g. https instead of http. Or there is a bad rewrite rule in your apache configuration that would cause API failures.
- If you are running Windows Authentication with Apache, you would need to white-list 127.0.0.1 in your Apache conf, as Apache doesn't have read access.
1 <Directory "D:/Wiki/htdocs"> 2 ... 3 4 Allow from 127.0.0.1 5 Satisfy Any 6 </Directory>
- parsoidserver-http-curl-error: couldn't connect to host.
- Parsoid is not running, or
$wgVirtualRestConfig['modules']['parsoid']['url']
is not set correctly - parsoidserver-http-curl-error: Failed to connect to ....: Permission denied.
- Can be caused by a cURL request on a Security-Enhanced Linux (SELinux, like CentOS) to a non standard port like 8000 in the example configuration above, see http://www.akashif.co.uk/php/curl-error-7-failed-to-connect-to-permission-denied and https://www.centos.org/forums/viewtopic.php?f=47&t=53223&p=225372#p225372
- parsoidserver-http-bad-status: 401
- Caused by read or edit restrictions. If you've set up a private wiki and don't want to use cookie forwarding, you can explicitly remove restrictions for Parsoid by IP address.
- parsoidserver-http-not-found: 404 (or timeout)
- Caused by wrong path to MediaWiki API endpoint. Set correct url to the right path to
api.php
in Parsoid'slocalsettings.js
config file. If you have set up following the recommendations, your API path would be "http://localhost/w/api.php". Add this API path to "localsettings.js" like "parsoidConfig.setMwApi({uri: 'http://localhost/w/api.php' });". - No visible error (Appears to load forever)
- Check the parsoid log file, and consult Parsoid/Troubleshooting.
References[edit]
![]() | This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
![]() | VisualEditor is maintained by Editing team.
Get help:
|
- MIT licensed extensions
- Beta status extensions
- Page action extensions
- Extended syntax extensions
- Beta Feature extensions
- Skin extensions
- Extensions in Wikimedia version control
- BeforePageDisplay extensions
- SkinEditSectionLinks extensions
- GetBetaFeaturePreferences extensions
- GetPreferences extensions
- PreferencesFormPreSave extensions
- ListDefinedTags extensions
- ChangeTagsListActive extensions
- MakeGlobalVariablesScript extensions
- RedirectSpecialArticleRedirectParams extensions
- ResourceLoaderGetConfigVars extensions
- ResourceLoaderTestModules extensions
- SkinTemplateNavigation extensions
- ParserTestGlobals extensions
- EditPage::showEditForm:fields extensions
- RecentChange save extensions
- BeforeInitialize extensions
- LocalUserCreated extensions
- CustomEditor extensions
- UserLoggedIn extensions
- All extensions
- Extensions used on Wikimedia
- WYSIWYG extensions
- VisualEditor