Follow-up to fefb76eebc. Prior to that
change, the condition for this looked like this:
// … if on a ?veaction=edit/editsource page
(
isViewPage &&
uri.query.veaction in editModes &&
(
uri.query.veaction === 'editsource' ||
init.isVisualAvailable
)
)
In the refactor, the `uri.query.veaction === 'editsource'` check was
lost.
Since that code is pretty messy (probably predating the source editor
and hastily adjusted), instead change the check for `isVisualAvailable`
to just `isAvailable`. If the requested mode turns out to not be
available later, the editor will not load.
Bug: T165146
Change-Id: Idfaf9115dd20cec8f8e044a704b93b07984cdcee
VisualEditor provides a visual editor for wiki pages. It is written in
JavaScript and runs in a web browser.
It uses the Parsoid parser to convert wikitext documents to annotated HTML
which the VisualEditor is able to load, modify and emit back to Parsoid at
which point it is converted back into wikitext.
For more information about these projects, check out the VisualEditor
and Parsoid pages on mediawiki.
For information about running tests and contributing code to VisualEditor,
see CONTRIBUTING.md. Patch submissions are reviewed and managed with
Gerrit. There is also API documentation available for the
VisualEditor.