mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
42757a724d
Use mw.config wgCurRevisionId for oldie instead of uri query. That way it also set on regular views, and as a bonus it the normalised value (e.g. if on a page with oldid in query but the id doesn't exist or is somehow invalid, it won't use it). Centralise page existence logic in JS and rename Target.oldId to Target.pageRevId (to further indicate that it is always set, not just on oldId views. To detect an oldId view, do a boolean check on value from currentUri.query.oldid directly). In PHP Api, move oldid logic to execute() method instead of locally from the getHTML call. That way it is always set, avoids hitting this bug in other methods instead of just getHTML(). Since the mw.Target constructor now retrieves the ID from mw.config directly, the second argument was removed. Change-Id: I223235a6ea8b4178c50beeaaedb709b2de7cf0b5 |
||
---|---|---|
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