User:DLynch (WMF)/VisualEditor/Configurations

From mediawiki.org

To an end-user the question "what editor are you using?" is difficult to answer. Which editing environment they see will depend on both site and user configuration.

There are a lot of different editors in various parts of MediaWiki. This article only really cares about the article-editor in its most current form.

Choices[edit]

WikiEditor is bundled with MediaWiki and is the default editing experience since 2010. It's a source mode editor, so you edit plain wikitext. It does have an editing toolbar.

VisualEditor is a more complicated matter. It's optional, but installed on all Wikimedia wikis. It can provide:

  • Visual mode: a WYSIWYG environment, where users don't have to know about wikitext to make changes.
  • Source mode: a wikitext source environment, similar to WikiEditor but with the same UI and tools as the visual mode.

A plain textarea, if no extensions are available to replace it. This is a source mode editor, with no toolbar or other editing tools.

Factors[edit]

Assuming we're on a wiki which has VisualEditor installed, which of these is used depends on several factors.

In Special:Preferences/Editing the user can choose to disable VisualEditor or WikiEditor. If both are disabled, or if JavaScript is disabled on the user's browser, a plain textarea will be used as the fallback.

In Special:Preferences/Beta the user can enable the "new wikitext mode" feature, which replaces WikiEditor with VisualEditor's source mode.

If VisualEditor is enabled, the user can choose what happens when you click "edit":

  • VisualEditor should always be used if possible
  • A source mode editor should always be used (VisualEditor-source / WikiEditor / textarea)
  • Whichever you last used should be remembered
  • Two tabs for "edit" and "edit source" should be shown so the user can choose each time

Even if VisualEditor is enabled, its visual mode is only allowed to be used on whitelisted namespaces and content models. By default this means the `wikitext` content model and the namespaces `Main`, `User`, `File`, and `Category`... but these can be configured differently on other sites.

Data analysis notes[edit]

If you're looking at logging in Schema:EditAttemptStep you can tell which of these is being used by looking at the `integration` field.

integration meaning
wikitext WikiEditor
wikitext-2017 VisualEditor in source mode
visualeditor VisualEditor in visual mode

There's no logging for the plain textarea option, as it's assumed to be a very rare fallback case. Also, a lot of our logging relies on JavaScript, and the most likely reason you'll be seeing the textarea is having JavaScript disabled.