mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
cddb3f1b39
As jQuery hash problems in some cases converting HTML, it is easier just to store the original DOM elements. The bulk of this commit is fixing the tests as although we have an assertion for comparing DOM elements, we don't have one for comparing objects or arrays which may contain DOM elements. ve.js * copyObject & copyArray fixed to run cloneNode(true) on any item of type Node. * Added callback function so an object/array can be copied with modifications. ve.qunit.js * Added deepEqualWithDomElements: Using the new copyObect/Array callback, we can copy the incoming object and convert any nodes to node summaries, then just run the normal deep equal comparison. ve.dm.AlienNodes.js * Instead of storing HMTL we store cloned DOM elements which we can send straight back to the converter without any processing. ve.dm.example.js * Updated tests to expect DOM elements instead of HTML. ve.dm.Converter.test.js * Updated tests to use deepEqualWithDomElements Bug: 47737 Change-Id: I3df8f49b170c31da9610129d53cf8cb65dd5d5f8 |
||
---|---|---|
.docs | ||
demos | ||
maintenance | ||
modules | ||
.gitignore | ||
.gitreview | ||
.jshintignore | ||
.jshintrc | ||
ApiVisualEditor.php | ||
AUTHORS.txt | ||
CODING.md | ||
LICENSE.txt | ||
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