2016-11-19 23:11:06 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor DataModel MWGalleryImageCaptionNode class.
|
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2016-11-19 23:11:06 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DataModel gallery image caption node.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.dm.BranchNode
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} [element] Reference to element in linear model
|
|
|
|
* @param {ve.dm.Node[]} [children]
|
|
|
|
*/
|
|
|
|
ve.dm.MWGalleryImageCaptionNode = function VeDmMWGalleryImageCaptionNode() {
|
|
|
|
// Parent constructor
|
|
|
|
ve.dm.MWGalleryImageCaptionNode.super.apply( this, arguments );
|
|
|
|
};
|
|
|
|
|
|
|
|
OO.inheritClass( ve.dm.MWGalleryImageCaptionNode, ve.dm.BranchNode );
|
|
|
|
|
|
|
|
ve.dm.MWGalleryImageCaptionNode.static.name = 'mwGalleryImageCaption';
|
|
|
|
|
|
|
|
ve.dm.MWGalleryImageCaptionNode.static.matchTagNames = [];
|
|
|
|
|
|
|
|
ve.dm.MWGalleryImageCaptionNode.static.parentNodeTypes = [ 'mwGalleryImage' ];
|
|
|
|
|
|
|
|
ve.dm.MWGalleryImageCaptionNode.static.toDomElements = function ( dataElement, doc ) {
|
2024-05-21 14:22:56 +00:00
|
|
|
const div = doc.createElement( 'div' );
|
2016-11-19 23:11:06 +00:00
|
|
|
div.classList.add( 'gallerytext' );
|
|
|
|
return [ div ];
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.dm.modelRegistry.register( ve.dm.MWGalleryImageCaptionNode );
|