mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
7287c80293
Redone using document.implementation.createHTMLDocument instead of the iframe trick. It's supported by all browsers we target, including IE9. This also makes VE work on Opera using a nasty hack. * Previously, for reasons I'm not even trying to understand, Opera would sometimes return an empty generic object from ve.createDocumentFromHTML() - but only if you weren't debugging it (Dragonfly was disabled). I have no idea what is it about the iframe hack that makes it not like it, but fact is, it doesn't work. * Calling .open(), .write() or .close() on the document returned by document.implementation.createHTMLDocument acts as if it was window.document - that is, the entire contents of the web page are replaced with new ones. That's probably a one-word bug somewhere deep in Opera's innards; I reported it (it got the identifier DSK-384486). Until it gets fixed, we work around it by using document.documentElement.innerHTML, which works reliably. Change-Id: I90ea547c735edaba9f7ecb8f685351ac6499c53e |
||
---|---|---|
.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