Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Html2Wt\SelectiveSerializer Class Reference

This is a Serializer class that will compare two versions of a DOM and re-use the original wikitext for unmodified regions of the DOM. More...

Public Member Functions

 __construct (Env $env, array $options)
 
 serializeDOM (Document $doc)
 Selectively serialize an HTML DOM.
 

Detailed Description

This is a Serializer class that will compare two versions of a DOM and re-use the original wikitext for unmodified regions of the DOM.

Originally this relied on special change markers inserted by the editor, but we now generate these ourselves using DOMDiff.

Member Function Documentation

◆ serializeDOM()

Wikimedia\Parsoid\Html2Wt\SelectiveSerializer::serializeDOM ( Document $doc)

Selectively serialize an HTML DOM.

WARNING: You probably want to use WikitextContentModelHandler::fromDOM instead.

Parameters
Document$doc
Returns
string

The documentation for this class was generated from the following file: