mediawiki-extensions-Visual.../modules/ve
Catrope 3035c311ec Make the converter work with full HTML documents rather than fragments
The Parsoid output will also be expected to be a full HTML document. For
backwards compatibility, we allow for the Parsoid output to be a
document fragment as well. We don't send a full document back yet, also
for b/c -- we'll change this later once Parsoid has been updated in
production.

ve.dm.Converter.js:
* Make getDataFromDom() accept a document rather than a node
** Split off the recursion (which does use nodes) into its own function
** For now we just convert the <body>. In the future, we'll want to do
   things with the <head> as well
* Pass the document around so we can use it when creating elements
* Make getDomFromData() return a document rather than a <div>

ve.init.mw.Target.js:
* Store a document (this.doc) rather than a DOM node (this.dom)
* Pass around documents rather than DOM nodes
* Detect whether the Parsoid output is an HTML document or a fragment
  using a hacky regex
* When submitting to Parsoid, submit the innerHTML of the <body>

ve.init.mw.ViewPageTarget.js:
* s/dom/doc/
* Store body.innerHTML in this.originalHtml

ve.Surface.js:
* s/dom/doc/

demos/ve/index.php:
* Don't wrap HTML in <div>
* Pass HTML document rather than DOM node to ve.Surface

ve.dm.Converter.test.js:
* Construct a document from the test HTML, rather than a <div>

ve.dm.example.js:
* Wrap the HTML in the converter test cases in <body> tags to prevent
  misinterpretation (HTML fragments starting with comments, <meta>,
  <link> and whitespace are problematic)

Change-Id: I82fdad0a099febc5e658486cbf8becfcdbc85a2d
2013-02-19 10:38:39 -08:00
..
actions Merge "Fixes for typos and some missing documentation" 2013-01-18 21:05:13 +00:00
ce Change the HTML attribute prefix from html/ to html/0/ 2013-02-06 12:00:43 -08:00
dm Make the converter work with full HTML documents rather than fragments 2013-02-19 10:38:39 -08:00
init Make the converter work with full HTML documents rather than fragments 2013-02-19 10:38:39 -08:00
styles Cleaned up paste target and surface styles 2013-01-17 15:02:47 -08:00
test Make the converter work with full HTML documents rather than fragments 2013-02-19 10:38:39 -08:00
ui Add user interface widgets 2013-02-13 18:04:04 -08:00
ve.Action.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.ActionFactory.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.AnnotationSet.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.BranchNode.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.CommandRegistry.js Add interplatform, i18n shortcuts to ui buttons. 2013-01-17 15:28:32 -08:00
ve.debug.js JSDuck: Generated code documentation! 2013-01-05 01:16:32 +01:00
ve.Document.js Remove range.normalize (not needed), use range.isCollapsed more often 2013-01-16 15:38:07 -08:00
ve.EventEmitter.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.Factory.js (bug 43841) Major ve.ui rewrite, especially ve.ui.LinkInspector 2013-01-15 15:05:11 -08:00
ve.js Add ve.createDocumentFromHTML() 2013-02-19 10:30:25 -08:00
ve.LeafNode.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.Node.js Node cleanup 2013-02-01 15:35:48 -08:00
ve.OrderedHashSet.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.Range.js Remove range.normalize (not needed), use range.isCollapsed more often 2013-01-16 15:38:07 -08:00
ve.Registry.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.Surface.js Make the converter work with full HTML documents rather than fragments 2013-02-19 10:38:39 -08:00
ve.Trigger.js Remove trailing commas 2013-02-01 14:45:35 -08:00
ve.TriggerRegistry.js Trigger refactor 2013-01-28 17:06:13 -08:00