2013-04-25 00:47:17 +00:00
|
|
|
/*!
|
2017-03-22 21:10:47 +00:00
|
|
|
* VisualEditor ContentEditable ImageCaptionNode class.
|
2013-04-25 00:47:17 +00:00
|
|
|
*
|
2018-01-03 00:54:47 +00:00
|
|
|
* @copyright 2011-2018 VisualEditor Team and others; see AUTHORS.txt
|
2013-04-25 00:47:17 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2017-03-22 21:10:47 +00:00
|
|
|
* ContentEditable image caption node.
|
2013-04-25 00:47:17 +00:00
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ce.BranchNode
|
2016-11-06 00:47:40 +00:00
|
|
|
* @mixins ve.ce.ActiveNode
|
|
|
|
*
|
2013-04-25 00:47:17 +00:00
|
|
|
* @constructor
|
|
|
|
* @param {ve.dm.MWImageCaptionNode} model Model to observe
|
2013-09-25 10:21:09 +00:00
|
|
|
* @param {Object} [config] Configuration options
|
2013-04-25 00:47:17 +00:00
|
|
|
*/
|
2016-08-22 21:44:59 +00:00
|
|
|
ve.ce.MWImageCaptionNode = function VeCeMWImageCaptionNode() {
|
2013-04-25 00:47:17 +00:00
|
|
|
// Parent constructor
|
2016-08-22 21:44:59 +00:00
|
|
|
ve.ce.MWImageCaptionNode.super.apply( this, arguments );
|
2016-11-06 00:47:40 +00:00
|
|
|
|
|
|
|
// Mixin constructor
|
|
|
|
ve.ce.ActiveNode.call( this );
|
2013-04-25 00:47:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2013-10-11 21:44:09 +00:00
|
|
|
OO.inheritClass( ve.ce.MWImageCaptionNode, ve.ce.BranchNode );
|
2013-04-25 00:47:17 +00:00
|
|
|
|
2016-11-06 00:47:40 +00:00
|
|
|
OO.mixinClass( ve.ce.MWImageCaptionNode, ve.ce.ActiveNode );
|
|
|
|
|
2013-04-25 00:47:17 +00:00
|
|
|
/* Static Properties */
|
|
|
|
|
2013-05-28 11:31:41 +00:00
|
|
|
ve.ce.MWImageCaptionNode.static.name = 'mwImageCaption';
|
2013-04-25 00:47:17 +00:00
|
|
|
|
2013-12-18 21:22:41 +00:00
|
|
|
ve.ce.MWImageCaptionNode.static.tagName = 'figcaption';
|
2013-05-23 05:47:11 +00:00
|
|
|
|
2013-04-25 00:47:17 +00:00
|
|
|
/* Registration */
|
|
|
|
|
2013-05-28 11:31:41 +00:00
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWImageCaptionNode );
|