Go to file
Roan Kattouw 970cf03cc8 Followup 5d7673eb: still adjust width/height when positioning fails
ve.ui.Context#updateDimensions does two things: it updates the position
of the popup by measuring where the selection is, and it updates the
width and height of the popup by measuring the contents of the inspector
or the context menu.

In some cases, measuring where the selection is fails, and
ve.ce.Surface#getSelectionRect returns null. This seems to only happen
1) in phantomjs while running the test suite and 2) when an inspector
is opened and doesn't adjust the selection while opening. I suspect
it has something to do with the selection not having been recently
set or the documentNode not having focus, but I haven't investigated
this in depth yet.

Prior to 5d7673eb, the editor would simply crash of the position
measurement failed. 5d7673eb changed this to just bail completely if
the position couldn't be measured, but that's also wrong. Without a
position measurement, we can't update the position of the popup, but
we can still adjust its width and height, and we should.

The failure to adjust the popup's width and height in this case was
causing a bug where opening the link inspector with the selection
set exactly to what the inspector would expand it to would cause the
popup's width and height to never be adjusted, and most of the inspector
to be invisible.

Bug: 58301
Change-Id: Ia6504e0a7b0cd1affbff2632e9f573684f1d5dcb
2013-12-11 19:54:44 +00:00
.docs Refactor Transclusion and Meta dialogs to use BookletLayout 2013-12-05 16:26:26 -08:00
bin Add missing specialcharacters messages to JSON blobs 2013-12-09 13:19:17 -08:00
demos Insert special character tool 2013-12-05 22:51:14 -08:00
maintenance Replace raw oojs-ui files with v0.1.0-pre (0267100ab3) 2013-11-20 10:27:48 +05:30
modules Followup 5d7673eb: still adjust width/height when positioning fails 2013-12-11 19:54:44 +00:00
.csslintignore Fix csslint warnings 2013-12-03 23:09:56 +01:00
.csslintrc Add .csslintrc file and fix remaining warnings 2013-06-05 11:07:00 +00:00
.gitignore Implement Grunt support (grunt jshint,csslint,qunit,watch) 2013-06-05 11:10:23 +00:00
.gitreview Set defaultrebase=0 2012-06-20 16:27:40 -07:00
.jscs.json Set up node-jscs, pass it, and configure in local Gruntfile 2013-12-06 10:37:27 -08:00
.jshintignore Add jquery.i18n files and RL module 2013-12-06 22:50:43 +00:00
.jshintrc oojs: Integrate with OOJS v1.0.0 2013-06-06 17:29:55 +02:00
ApiVisualEditor.php Show full language names in the MW language dialog 2013-12-06 13:10:33 +00:00
ApiVisualEditorEdit.php Implement serialization cache in VisualEditor API 2013-11-20 10:26:47 +00:00
AUTHORS.txt Add Moriel Schottlender to AUTHORS.txt and authors string 2013-10-23 11:24:03 -07:00
betafeatures-icon-VisualEditor-formulae-ltr.svg Adapt beta features icons for RTL 2013-11-08 18:33:53 +02:00
betafeatures-icon-VisualEditor-formulae-rtl.svg Adapt beta features icons for RTL 2013-11-08 18:33:53 +02:00
betafeatures-icon-VisualEditor-ltr.svg Adapt beta features icons for RTL 2013-11-08 18:33:53 +02:00
betafeatures-icon-VisualEditor-rtl.svg Adapt beta features icons for RTL 2013-11-08 18:33:53 +02:00
CONTRIBUTING.md doc: Get rid of 'static' property container in jsduck index 2013-11-19 10:21:39 +00:00
Gruntfile.js Set up node-jscs, pass it, and configure in local Gruntfile 2013-12-06 10:37:27 -08:00
LICENSE.txt Bump copyright year range to 2013 in the licence file 2013-03-18 09:55:57 -07:00
package.json Set up node-jscs, pass it, and configure in local Gruntfile 2013-12-06 10:37:27 -08:00
README.md Updates to README.md and CODING.md 2013-09-17 19:09:25 -04:00
VisualEditor.hooks.php Organise Flat/ElementLinearData methods and tests 2013-12-10 17:51:36 +00:00
VisualEditor.i18n.php Put the shim from 9abad038 back (was reverted in b9bbf60f) 2013-12-10 11:11:10 -08:00
VisualEditor.php Add language code to language dialog 2013-12-11 02:42:20 +00:00
VisualEditorDataModule.php Create base MobileView config and target refactor 2013-12-02 17:59:27 -08:00

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 CODING.md. Patch submissions are reviewed and managed with Gerrit. There is also API documentation available for the VisualEditor.