mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
f538fcf6be
The sanity check converts the linear model back to DOM, then compares this DOM to the original DOM and rejects the deferred if they are not equal. The DOM creation has to be done synchronously (before we unlock the surface), but the actual comparsion can be (and is) done asynchronously. To make the UI flow of the save dialog easier we just keep the save button on the toolbar itself disabled until the sanity check is done. Though this should finish before the user starts editing the document (let alone start saving), we do add a class to the button to indicate a progress cursor. To simulate a slow sanity check, set the setTimeout in startSanityCheck to 5000, load VE, make a change, hover the button, and see it change from disabled + progress-cursor to enabled after 5 seconds. To simulate the sanity check failing, change !== to === in the first "if" in startSanityCheck. Bug: 47521 Bug: 50067 Change-Id: I04f71fe8e00c6257fbc953cc9de3323e24709b0f |
||
---|---|---|
.docs | ||
demos | ||
maintenance | ||
modules | ||
.csslintrc | ||
.gitignore | ||
.gitreview | ||
.jshintignore | ||
.jshintrc | ||
ApiVisualEditor.php | ||
AUTHORS.txt | ||
CODING.md | ||
Gruntfile.js | ||
LICENSE.txt | ||
package.json | ||
README.txt | ||
VisualEditor.hooks.php | ||
VisualEditor.i18n.php | ||
VisualEditor.php | ||
VisualEditorMessagesModule.php |
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 wiki: * http://www.mediawiki.org/wiki/VisualEditor * http://www.mediawiki.org/wiki/Parsoid