Go to file
Roan Kattouw d371014e5d Load RL modules in one load.php request, rather than in two stages
This introduces TargetLoader, which manages plugins and RL modules
in a slightly more generic fashion so that Targets themselves don't
have to. This allows us to load all RL modules in one load.php
request, rather than first loading ViewPageTarget which then
loads the other modules.

TargetLoader loads in the bottom queue, so it will be loaded
as part of the main load.php request, but in VPT.init.js we
still have to wait for it with using() because it might not
have arrived yet. This also degrades gracefully on cached pages
where TargetLoader isn't in the bottom queue: it'll be loaded
as a separate request instead, which is suboptimal but no
worse that what we were doing before.

Right now TargetLoader is small enough that it could also be in
the top queue, but in the future we want to add things like
the action=visualeditor API request to it, and mw.Api is
relatively big.

Note: this also makes a breaking change to the plugin API:
plugin callbacks no longer receive the target instance
as a parameter, as they're now executed before the target
has been constructed rather than after. In the long term,
if we want to give plugins access to the target instance,
we could give them the target promise somehow. For now,
I've killed this feature because nothing used it and
the change from a direct object reference to a promise
would have been a breaking change anyway.

Also fixed incorrect documentation index for ve.init.mw.ViewPageTarget.init.

Bug: T53569
Change-Id: Ibfa6abbeaf872ae2aadc6ed9d5beba7473ea441a
2015-03-15 03:43:05 +01:00
.jsduck Load RL modules in one load.php request, rather than in two stages 2015-03-15 03:43:05 +01:00
bin Update JSDuck config to standard jsduck.json 2015-03-05 23:51:53 +01:00
build/tasks Use submodule for VisualEditor core 2013-12-20 09:18:41 +00:00
lib Update VE core submodule to master (792b450) 2015-03-12 17:06:28 -07:00
modules Load RL modules in one load.php request, rather than in two stages 2015-03-15 03:43:05 +01:00
.csslintrc Transform the search widget to show image details 2015-01-16 13:22:54 +00:00
.gitignore Add composer entry point for phpcs and linting 2015-03-06 08:44:30 -08:00
.gitmodules Use submodule for VisualEditor core 2013-12-20 09:18:41 +00:00
.gitreview
.jscsrc build: Enforce disallowMixedSpacesAndTabs jscs rule 2015-03-07 16:49:30 +00:00
.jshintignore Move libraries to the lib/ directory 2013-12-19 23:02:52 +01:00
.jshintrc test: Move mw into the global list of globals for VE-MW 2014-07-19 17:42:45 +00:00
.rubocop.yml [BrowserTest] RuboCop should not complain about number of lines in a method 2014-11-21 16:57:27 +00:00
.rubocop_todo.yml [BrowserTest] Remove outdated offenses from .rubocop_todo.yml 2015-02-20 13:39:18 +02:00
ApiVisualEditor.php Move parseWikitext from ApiVisualEditor.php to ApiVisualEditorEdit.php 2015-03-14 00:27:11 +01:00
ApiVisualEditorEdit.php Move parseWikitext from ApiVisualEditor.php to ApiVisualEditorEdit.php 2015-03-14 00:27:11 +01:00
AUTHORS.txt AUTHORS.txt: Credit libraries as well as direct contributors 2014-11-13 16:45:03 +00:00
betafeatures-icon-VisualEditor-ltr.svg Run node-svgo to crush all SVGs whilst retaining readibility 2014-07-01 16:58:05 -07:00
betafeatures-icon-VisualEditor-rtl.svg Run node-svgo to crush all SVGs whilst retaining readibility 2014-07-01 16:58:05 -07:00
composer.json Add composer entry point for phpcs and linting 2015-03-06 08:44:30 -08:00
CONTRIBUTING.md Fix dead links in README.md and CONTRIBUTING.md 2014-03-10 18:26:30 +01:00
extension.json Load RL modules in one load.php request, rather than in two stages 2015-03-15 03:43:05 +01:00
Gemfile [BrowserTest] Remove upload.rb - it's fully replaced with the gem 2015-02-23 11:27:55 +00:00
Gemfile.lock [BrowserTest] Update Ruby gems 2015-03-05 10:51:19 +00:00
Gruntfile.js Update JSDuck config to standard jsduck.json 2015-03-05 23:51:53 +01:00
jsduck.json Follow-up I5918367: Add new classes to jsduck.json 2015-03-05 15:43:24 -08:00
LICENSE.txt build: Bump copyright notices to 2015 2015-01-12 20:34:19 -08:00
package.json build: Update jscs to latest 2015-03-07 04:05:44 +00:00
README.md README: Add devDependencies badge 2014-09-16 13:39:31 -07:00
VisualEditor.hooks.php Load RL modules in one load.php request, rather than in two stages 2015-03-15 03:43:05 +01:00
VisualEditor.php Load RL modules in one load.php request, rather than in two stages 2015-03-15 03:43:05 +01:00
VisualEditorDataModule.php VisualEditorDataModule depends on ext.visualEditor.mediaWiki 2015-02-24 23:10:27 -05:00
VisualEditorViewPageTargetInitModule.php build: Bump copyright notices to 2015 2015-01-12 20:34:19 -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.