Go to file
Bartosz Dziewoński a9066989f2 ApiVisualEditor: Refactor edit notice code
* Query permission errors for 'edit' and 'create' in the same way,
  and consistently with how MediaWiki core EditPage does it.

* Prefer using Title::getUserPermissionsErrors() instead of custom
  code for user blocks. The result is the same, except for an extra
  line like "You do not have permission to edit this page, for the
  following reason:".

  Note that this loses the 'type' => 'block' property on each notice,
  which was previously used to track when a block notice was shown.
  This was however removed in 96de1353d3,
  and could probably be re-implemented by using the root 'blockinfo'
  property anyway.

* When Title::getUserPermissionsErrors() returns multiple messages
  (for example, you're blocked *and* the page is protected),
  display them all in a list instead of only the first one, using
  OutputPage::formatPermissionsErrorMessage().

  That method returns wikitext, which we have to parse ourselves. This
  is a bit silly, but I found this approach in SpecialChangeContentModel
  in MediaWiki core, so it should be fine.

Change-Id: Ifaf95d8aab836e45665b1fbdf98dd1980a867d8c
2020-01-17 01:18:46 +01:00
.jsduck Update VE core submodule to master (3b3dcad84) 2019-12-02 17:26:58 -08:00
.phan
bin
build eslint: Remove unused prefer-template rule; use proper globals values 2019-10-07 17:22:24 +00:00
i18n Localisation updates from https://translatewiki.net. 2020-01-15 09:54:22 +01:00
images
includes ApiVisualEditor: Refactor edit notice code 2020-01-17 01:18:46 +01:00
lib Update VE core submodule to master (57689b9ed) 2020-01-08 16:45:10 -08:00
maintenance doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
modules Merge "Use mw.Api#getErrorMessage instead of custom handling" 2020-01-10 14:22:14 +00:00
screenshots
.eslintrc.json Replace $.when with ve.promiseAll 2019-11-04 22:06:54 +08:00
.gitignore
.gitmodules
.gitreview
.mailmap
.phpcs.xml Fix new documentation sniffs 2020-01-10 16:28:16 -08:00
.rubocop.yml
.rubocop_todo.yml
.stylelintrc.json
AUTHORS.txt
composer.json build: Updating mediawiki/mediawiki-codesniffer to 29.0.0 2020-01-10 17:51:43 +00:00
CONTRIBUTING.md doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
extension.json Merge "Use mw.Api#getErrorMessage instead of custom handling" 2020-01-10 14:22:14 +00:00
Gemfile
Gemfile.lock
Gruntfile.js build: Update linters 2019-11-01 16:20:22 +00:00
jsduck.json Update VE core submodule to master (0b17a137b) 2019-09-05 13:03:41 -07:00
LICENSE.txt doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
package-lock.json build: Updating npm dependencies 2020-01-07 09:54:44 +00:00
package.json build: Updating npm dependencies 2020-01-07 09:54:44 +00:00
Rakefile
README.md
VisualEditor.i18n.alias.php doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
VisualEditor.php doc: Bump copyright year for 2020 2020-01-08 09:13:24 -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.