2020-05-07 20:35:52 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor ContentEditable MWIncludesNode class.
|
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2020-05-07 20:35:52 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ContentEditable MW node for noinclude, includeonly and onlyinclude tags.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.ce.AlienInlineNode
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.dm.MWIncludesNode} model
|
|
|
|
* @param {Object} [config]
|
|
|
|
*/
|
|
|
|
ve.ce.MWIncludesNode = function VeCeMWIncludesNode() {
|
|
|
|
// Parent constructor
|
|
|
|
ve.ce.MWIncludesNode.super.apply( this, arguments );
|
|
|
|
|
|
|
|
// DOM changes
|
|
|
|
this.$element
|
|
|
|
.addClass( 've-ce-mwIncludesNode' )
|
|
|
|
.text( this.model.getWikitextTag() );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ce.MWIncludesNode, ve.ce.AlienInlineNode );
|
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.ce.MWIncludesNode.static.name = 'mwIncludes';
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWIncludesNode );
|