Specs/HTML/1.3.0/Extensions/Gallery

The basic structure is as follows.

This gallery:

Renders as:

and  modes add some additional structure around

Attributes to support (on the extension tag):
 * showfilename
 * caption
 * mode
 * widths
 * heights
 * perrow

Renders as:

A more involved example:

Renders as:

A showfilename example:

Renders as:

Editing support
All the extension attributes, except, need to be edited via data-mw.

Parsoid provides the raw extension body text in  and raw gallerycaption in   for clients to edit in a raw-text editor. If these data-mw properties are provided in the edited HTML, Parsoid uses that to generate serialized output for the extension. These properties should be removed from data-mw to enable serializing the HTML content instead.

As of December 2016, this HTML editing support should be considered experimental while we work with existing clients like VisualEditor to test the accuracy of this feature.