Parsoid
A bidirectional parser between wikitext and HTML5
|
Used as a fallback in other tag handles. More...
Public Member Functions | ||||||||||
handle (Element $node, SerializerState $state, bool $wrapperUnmodified=false) | ||||||||||
Serialize a DOM node to wikitext.Serialized wikitext should be returned via $state::emitChunk().
| ||||||||||
Public Member Functions inherited from Wikimedia\Parsoid\Html2Wt\DOMHandlers\DOMHandler | ||||||||||
__construct (bool $forceSOL=false) | ||||||||||
before (Element $node, Node $otherNode, SerializerState $state) | ||||||||||
How many newlines should be emitted before this node? | ||||||||||
after (Element $node, Node $otherNode, SerializerState $state) | ||||||||||
How many newlines should be emitted after this node? | ||||||||||
firstChild (Node $node, Node $otherNode, SerializerState $state) | ||||||||||
How many newlines should be emitted before the first child? | ||||||||||
lastChild (Node $node, Node $otherNode, SerializerState $state) | ||||||||||
How many newlines should be emitted after the last child? | ||||||||||
forceSOL () | ||||||||||
Put the serializer in start-of-line mode before it is handled. | ||||||||||
Additional Inherited Members | |
Protected Member Functions inherited from Wikimedia\Parsoid\Html2Wt\DOMHandlers\DOMHandler | |
getListBullets (SerializerState $state, Element $node) | |
List helper: DOM-based list bullet construction. | |
maxNLsInTable (Node $node, Node $origNode) | |
Helper: Newline constraint helper for table nodes. | |
serializeTableTag (string $symbol, ?string $endSymbol, SerializerState $state, Element $node, bool $wrapperUnmodified) | |
Helper: Handles content serialization for table nodes. | |
stxInfoValidForTableCell (SerializerState $state, Element $node) | |
Helper: Checks whether syntax information in data-parsoid is valid in the presence of table edits. | |
getLeadingSpace (SerializerState $state, Element $node, string $newEltDefault) | |
Helper for several DOM handlers: Returns whitespace that needs to be emitted between the markup for the node and its content (ex: table cells, list items) based on node state (whether the node is original or new content) and other state (HTML version, whether selective serialization is enabled or not). | |
getTrailingSpace (SerializerState $state, Element $node, string $newEltDefault) | |
Helper for several DOM handlers: Returns whitespace that needs to be emitted between the markup for the node and its next sibling based on node state (whether the node is original or new content) and other state (HTML version, whether selective serialization is enabled or not). | |
emitPlaceholderSrc (Element $node, SerializerState $state) | |
Uneditable forms wrapped with mw:Placeholder tags OR unedited nowikis N.B. | |
Used as a fallback in other tag handles.
Wikimedia\Parsoid\Html2Wt\DOMHandlers\FallbackHTMLHandler::handle | ( | Element | $node, |
SerializerState | $state, | ||
bool | $wrapperUnmodified = false ) |
Serialize a DOM node to wikitext.Serialized wikitext should be returned via $state::emitChunk().
Element | $node | |
SerializerState | $state | |
bool | $wrapperUnmodified |
Reimplemented from Wikimedia\Parsoid\Html2Wt\DOMHandlers\DOMHandler.