mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
0054cd2a57
Exception was caused by passing -1 to getAnnotationsFromOffset(). So check for -1 before passing it in; getNearestContentOffset() can legitimately return -1 if there are no content offsets in the document, which occurs when the document is empty. I was originally going to change getNearestContentOffset(start - 1, -1) to getRelativeContentOffset(start, -1), but Inez correctly pointed out that that would have unwanted results when near an inline node. Change-Id: Ife4b497b1c5fd04d411bb25cea99e6ea2abf146f |
||
---|---|---|
demos/ve | ||
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