Go to file
Ed Sanders 76caef6b4b Use session storage to auto-save
Ensure we start with the same HTML (i.e. if an edit has
been made since the crash-recovery):
* Whenever an article target is activated, stash the initial
  document html, other parsoid response data, and the request
  parameters (pageName, mode, section) in session storage.
* Whenever an article is fetched through the target loader,
  recover from session storage if the request parameters match.

Store transactions:
* On document transaction (debounced) append the latest
  changes to session storage.
* If a document state is recovered from session storage,
  attempt to re-apply the stored transactions.

Clear transactions:
* Whenever the target is torn down (i.e. save, deliberately
  closing the editor to go back to read mode)

Other:
* If writing to session storage fails once, disable future
  attempts for that session (assume storage quota exceeded)
* Disable tempWikitextEditor when recovering. We don't have
  the transaction code loaded yet to perform the recovery.

Bug: T57370
Depends-On: I3832243fc347a99641fcb7e39a887a153c9a3b22
Depends-On: I448fb566fe9f7f5b5a76e88b70ca000e3d35b415
Change-Id: Id9d877f903cf4796a52f90991c030417a9f8786f
2018-02-27 12:19:06 +00:00
.jsduck Update VE core submodule to master (c5fddd508) 2018-01-29 08:43:08 -08:00
bin bin/updateSubmodule.sh: Copy 'Bug:' lines from included changes 2017-09-13 18:14:41 +02:00
build Merge "Catch timeout errors in screenshot scripts" 2018-01-13 11:09:25 +00:00
i18n Localisation updates from https://translatewiki.net. 2018-02-23 23:01:57 +01:00
images Merge "Re-crush beta feature SVG screenshots" 2018-02-08 12:18:28 +00:00
includes Follow-up Idbcb76f: Only apply /includes folder fix to local path 2018-02-12 21:59:22 +00:00
lib Update VE core submodule to master (e6b9330) 2018-02-25 21:00:32 +00:00
maintenance build: Move PHP files to expected paths 2018-02-07 12:31:08 -08:00
modules Use session storage to auto-save 2018-02-27 12:19:06 +00:00
screenshots Add screenshots grunt task for taking documentation screenshots 2016-06-27 12:19:35 +01:00
.eslintrc.json mw.DesktopArticleTarget: Use require() for mw.page.watch 2017-05-24 21:17:02 +00:00
.gitignore Add .idea to .gitignore 2017-01-27 13:16:58 +01:00
.gitmodules Use submodule for VisualEditor core 2013-12-20 09:18:41 +00:00
.gitreview .gitreview: swapping defaultbranch for track 2016-10-25 10:58:48 +02:00
.mailmap Update AUTHORS.txt for the last couple of years' work 2018-01-03 11:51:37 -08:00
.phpcs.xml phpcs: Don't try to be smart about excluding VE, it doesn't work 2018-02-07 12:31:09 -08:00
.rubocop.yml build: Bump Ruby cruft to avoid security warnings for old rubocop 2017-11-28 12:09:20 -08:00
.rubocop_todo.yml build: Bump Ruby cruft to avoid security warnings for old rubocop 2017-11-28 12:09:20 -08:00
.stylelintrc.json Update VE core submodule to master (6111ca575) 2017-08-21 11:28:34 -07:00
AUTHORS.txt Update AUTHORS.txt for the last couple of years' work 2018-01-03 11:51:37 -08:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 16.0.1 2018-02-25 05:34:34 +00:00
CONTRIBUTING.md Update link to contributing guidelines 2017-08-21 18:22:35 -04:00
extension.json Use session storage to auto-save 2018-02-27 12:19:06 +00:00
Gemfile build: Bump Ruby cruft to avoid security warnings for old rubocop 2017-11-28 12:09:20 -08:00
Gemfile.lock build: Bump Ruby cruft to avoid security warnings for old rubocop 2017-11-28 12:09:20 -08:00
Gruntfile.js build: Use SVGO option of 'grunt-image' 2018-02-08 17:41:11 +00:00
jsduck.json Update VE core submodule to master (7a8829509) 2017-08-31 11:39:36 -07:00
LICENSE.txt doc: Bump copyright year 2018-01-03 17:45:07 +00:00
package.json build: Use SVGO option of 'grunt-image' 2018-02-08 17:41:11 +00:00
Rakefile build: Bump Ruby cruft to avoid security warnings for old rubocop 2017-11-28 12:09:20 -08:00
README.md README: Add devDependencies badge 2014-09-16 13:39:31 -07:00
VisualEditor.i18n.alias.php Setting aliases of some special page names for Urdu language 2017-10-13 16:53:28 +00:00
VisualEditor.php doc: Bump copyright year 2018-01-03 17:45:07 +00: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.