Go to file
Bartosz Dziewoński d687e01208 Do not check for visual editor availability when loading source editor
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
2017-05-16 18:57:56 +02:00
.jsduck Update VE core submodule to master (bfb35aaef) 2017-04-20 09:48:46 -07:00
bin Merge "Add a clean-up script for use as a pre-commit hook" 2015-09-14 00:33:31 +00:00
build Merge "Run screenshot tests in series" 2017-05-05 15:55:41 +00:00
lib Update VE core submodule to master (45aa796b3) 2017-05-15 17:41:15 +01:00
modules Do not check for visual editor availability when loading source editor 2017-05-16 18:57:56 +02:00
screenshots Add screenshots grunt task for taking documentation screenshots 2016-06-27 12:19:35 +01:00
.eslintrc.json eslint: Remove duplicate rule (no-alert) 2017-04-29 12:21:40 +01:00
.gitignore Add .idea to .gitignore 2017-01-27 13:16:58 +01:00
.gitmodules
.gitreview .gitreview: swapping defaultbranch for track 2016-10-25 10:58:48 +02:00
.mailmap .mailmap: Add some extra addresses and change default for rmoen 2015-11-30 12:56:01 -08:00
.rubocop.yml [BrowserTest] Fix ve.init is undefined error messages in Selenium tests 2016-02-18 15:42:05 +01:00
.rubocop_todo.yml [BrowserTest] Fix ve.init is undefined error messages in Selenium tests 2016-02-18 15:42:05 +01:00
.stylelintrc build: Use grunt-stylelint from npm 2016-05-17 16:24:39 +01:00
ApiVisualEditor.php build: Enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment 2017-05-11 08:19:44 -07:00
ApiVisualEditorEdit.php build: Enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment 2017-05-11 08:19:44 -07:00
AUTHORS.txt AUTHORS.txt: Be more strict about 'principal' authors and update addresses 2015-11-30 12:56:02 -08:00
autodisablePref.php build: Enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment 2017-05-11 08:19:44 -07:00
betafeatures-icon-VisualEditor-ltr.svg Update beta feature screenshots to use proper layout and colours 2016-10-12 16:39:27 -07:00
betafeatures-icon-VisualEditor-rtl.svg Update beta feature screenshots to use proper layout and colours 2016-10-12 16:39:27 -07:00
betafeatures-icon-WikitextEditor-ltr.svg Update beta feature screenshots to use proper layout and colours 2016-10-12 16:39:27 -07:00
betafeatures-icon-WikitextEditor-rtl.svg Update beta feature screenshots to use proper layout and colours 2016-10-12 16:39:27 -07:00
composer.json build: Bump mediawiki-codesniffer to 0.8.0 and make pass 2017-05-11 08:19:44 -07:00
CONTRIBUTING.md
extension.json build: Enable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName 2017-05-11 08:19:44 -07:00
Gemfile Update tests to Selenium 3 2017-02-28 14:39:00 +01:00
Gemfile.lock Update tests to Selenium 3 2017-02-28 14:39:00 +01:00
Gruntfile.js Avoid global variables in tests and build 2017-04-29 12:37:53 +01:00
jsduck.json Update VE core submodule to master (977d3ad) 2016-10-31 17:35:46 -04:00
LICENSE.txt build: Bump file copyright notices for 2017 2017-01-03 08:58:33 -08:00
package.json build: Update eslint to 0.4.0 and make pass 2017-05-04 21:28:17 +00:00
phpcs.xml build: Enable MediaWiki.Commenting.FunctionComment.MissingParamComment 2017-05-11 21:20:37 +00:00
Rakefile [BrowserTest] Migration of browsertests* Jenkins jobs to selenium* jobs 2016-04-26 12:40:45 +02:00
README.md
VisualEditor.hooks.php Always prefer wikitext for action=edit on non-SET wikis 2017-05-15 12:48:30 +01:00
VisualEditor.php build: Bump file copyright notices for 2017 2017-01-03 08:58:33 -08:00
VisualEditorDataModule.php build: Enable MediaWiki.Commenting.FunctionComment.MissingParamComment 2017-05-11 21:20:37 +00:00
VisualEditorDesktopArticleTargetInitModule.php build: Bump file copyright notices for 2017 2017-01-03 08:58:33 -08:00

devDependency Status

VisualEditor

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.

Developing and installing

For information on installing VisualEditor on a local wiki, please see https://www.mediawiki.org/wiki/Extension:VisualEditor

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.