mediawiki-extensions-Visual.../modules/ve/dm
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
..
annotations Added support for passing data into annotation constructors 2013-01-28 11:01:52 -08:00
nodes Use .static.isMeta to communicate meta-ness 2013-02-07 17:17:34 -08:00
ve.dm.Annotation.js Added support for passing data into annotation constructors 2013-01-28 11:01:52 -08:00
ve.dm.AnnotationFactory.js Move matching code from AnnotationFactory to ModelRegistry 2013-01-22 15:51:37 -08:00
ve.dm.BranchNode.js Major Documentation Cleanup 2013-01-16 15:37:59 -08:00
ve.dm.Converter.js Make the converter work with full HTML documents rather than fragments 2013-02-19 10:38:39 -08:00
ve.dm.Document.js Merge "(bug 45029) Transactions for metadata modification." 2013-02-15 01:28:44 +00:00
ve.dm.DocumentSlice.js ve.dm.DocumentSlice does not extend ve.Node 2013-02-08 14:11:11 -08:00
ve.dm.DocumentSynchronizer.js Automatically prune empty text nodes 2013-01-28 17:09:56 -08:00
ve.dm.js Move matching code from AnnotationFactory to ModelRegistry 2013-01-22 15:51:37 -08:00
ve.dm.LeafNode.js Convert node rules to static properties 2013-01-18 14:51:40 -08:00
ve.dm.ModelRegistry.js Fixed documentation warning 2013-01-30 12:52:03 -08:00
ve.dm.Node.js Use .static.isMeta to communicate meta-ness 2013-02-07 17:17:34 -08:00
ve.dm.NodeFactory.js Use .static.isMeta to communicate meta-ness 2013-02-07 17:17:34 -08:00
ve.dm.Surface.js Remove range.normalize (not needed), use range.isCollapsed more often 2013-01-16 15:38:07 -08:00
ve.dm.SurfaceFragment.js Added support for passing data into annotation constructors 2013-01-28 11:01:52 -08:00
ve.dm.Transaction.js (bug 45029) Transactions for metadata modification. 2013-02-14 17:27:27 -08:00
ve.dm.TransactionProcessor.js (bug 45029) Transactions for metadata modification. 2013-02-14 17:27:27 -08:00