mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
7465b670e1
This has some TODOs still but I want to land it now anyway, and fix the TODOs later. * Add this.offsetMap which maps each linear model offset to a model tree node * Refactor createNodesFromData() ** Rename it to buildSubtreeFromData() ** Have it build an offset map as well as a node subtree ** Have it set the root on the fake root node so that when the subtree is attached to the main tree later, we don't get a rippling root update all the way down ** Normalize the way the loop processes content, that way adding offsets for content is easier * Add rebuildNodes() which uses buildSubtreeFromData() to rebuild stuff * Use rebuildNodes() in DocumentSynchronizer * Use pushRebuild() in TransactionProcessor * Optimize setRoot() for the case where the root is already set correctly Change-Id: I8b827d0823c969e671615ddd06e5f1bd70e9d54c |
||
---|---|---|
api | ||
contentEditable | ||
demos | ||
modules | ||
tests | ||
.gitreview | ||
README | ||
SpecialVisualEditorSandbox.php | ||
VisualEditor.alias.php | ||
VisualEditor.i18n.php | ||
VisualEditor.php |
We're starting to merge bits from Wikidom and ParserPlayground tests here. Enjoy! Short-term work highlights: * convert parser to wikidom format & using the wikidom serializer * port/update/write more tests * Special: page to host the editor as a standalone demo * Opt-in test mode to switch the editor in on EditPage (initially blank) * Use serializer to save pages from editor * Use parser to load pages into editor Long-term work highlights: * more thorough & bulk testing * more extension support