|
Parsoid
A bidirectional parser between wikitext and HTML5
|
Implements the php parser's renderImageGallery natively.
More...
Inheritance diagram for Wikimedia\Parsoid\Ext\Gallery\Gallery:
Collaboration diagram for Wikimedia\Parsoid\Ext\Gallery\Gallery:Public Member Functions | |||||||||||||
| getConfig () | |||||||||||||
Return information about this extension module.The structure of the return value is enforced by moduleconfig.schema.json, in this directory.
| |||||||||||||
| sourceToDom (ParsoidExtensionAPI $extApi, string $content, array $args) | |||||||||||||
Convert an extension tag's content to "prepared and loaded" DOM.
| |||||||||||||
| domToWikitext (ParsoidExtensionAPI $extApi, Element $node, bool $wrapperUnmodified) | |||||||||||||
Serialize a DOM node created by this extension to wikitext.
| |||||||||||||
| diffHandler (ParsoidExtensionAPI $extApi, callable $domDiff, Element $origNode, Element $editedNode) | |||||||||||||
XXX: Experimental.Call $domDiff on corresponding subtrees of $origNode and $editedNode
| |||||||||||||
Public Member Functions inherited from Wikimedia\Parsoid\Ext\ExtensionTagHandler | |||||||||||||
| processAttributeEmbeddedHTML (ParsoidExtensionAPI $extApi, Element $elt, Closure $proc) | |||||||||||||
| Extensions might embed HTML in attributes in their own custom representation (whether in data-mw or elsewhere). | |||||||||||||
| processAttributeEmbeddedDom (ParsoidExtensionAPI $extApi, Element $elt, callable $proc) | |||||||||||||
| Extensions might embed HTML in attributes in their own custom representation (whether in data-mw or elsewhere). | |||||||||||||
| lintHandler (ParsoidExtensionAPI $extApi, Element $rootNode, callable $defaultHandler) | |||||||||||||
| Lint handler for this extension. | |||||||||||||
Implements the php parser's renderImageGallery natively.
Params to support (on the extension tag):
A proposed spec is at: https://phabricator.wikimedia.org/P2506
| Wikimedia\Parsoid\Ext\Gallery\Gallery::diffHandler | ( | ParsoidExtensionAPI | $extApi, |
| callable | $domDiff, | ||
| Element | $origNode, | ||
| Element | $editedNode ) |
XXX: Experimental.Call $domDiff on corresponding subtrees of $origNode and $editedNode
| ParsoidExtensionAPI | $extApi | |
| callable | $domDiff | |
| Element | $origNode | |
| Element | $editedNode |
Reimplemented from Wikimedia\Parsoid\Ext\ExtensionTagHandler.
| Wikimedia\Parsoid\Ext\Gallery\Gallery::domToWikitext | ( | ParsoidExtensionAPI | $extApi, |
| Element | $node, | ||
| bool | $wrapperUnmodified ) |
Serialize a DOM node created by this extension to wikitext.
| ParsoidExtensionAPI | $extApi | |
| Element | $node | A node in a "prepared and loaded" document. |
| bool | $wrapperUnmodified |
Reimplemented from Wikimedia\Parsoid\Ext\ExtensionTagHandler.
| Wikimedia\Parsoid\Ext\Gallery\Gallery::getConfig | ( | ) |
Return information about this extension module.The structure of the return value is enforced by moduleconfig.schema.json, in this directory.
Implements Wikimedia\Parsoid\Ext\ExtensionModule.
| Wikimedia\Parsoid\Ext\Gallery\Gallery::sourceToDom | ( | ParsoidExtensionAPI | $extApi, |
| string | $content, | ||
| array | $args ) |
Convert an extension tag's content to "prepared and loaded" DOM.
| ParsoidExtensionAPI | $extApi | |
| string | $content | Extension tag content |
| array | $args | Extension tag arguments The extension tag arguments should be treated as opaque objects and any necessary inspection should be handled through the API. |
DocumentFragment if returning some parsed content false to fallback to the default handler for the content null to drop the instance completely | ExtensionError |
Reimplemented from Wikimedia\Parsoid\Ext\ExtensionTagHandler.