mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-05 14:12:53 +00:00
671c7d3b25
MWMath and other simple extensions all behave in a similar way, e.g. <tagname>Foreign syntax</tagname>. This creates a base class that should make supporting such extensions, and editing their contents in a plain text box, very simple. Change-Id: Icc0acb33fe32704f71dacb552d9dfa3142eaef2b
36 lines
730 B
JavaScript
36 lines
730 B
JavaScript
/*!
|
|
* VisualEditor DataModel MWMathNode class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* DataModel MediaWiki math node.
|
|
*
|
|
* @class
|
|
* @extends ve.dm.MWExtensionNode
|
|
*
|
|
* @constructor
|
|
*/
|
|
ve.dm.MWMathNode = function VeDmMWMathNode( length, element ) {
|
|
// Parent constructor
|
|
ve.dm.MWExtensionNode.call( this, 0, element );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.dm.MWMathNode, ve.dm.MWExtensionNode );
|
|
|
|
/* Static members */
|
|
|
|
ve.dm.MWMathNode.static.name = 'mwMath';
|
|
|
|
ve.dm.MWMathNode.static.tagName = 'img';
|
|
|
|
ve.dm.MWMathNode.static.extensionName = 'math';
|
|
|
|
/* Registration */
|
|
|
|
ve.dm.modelRegistry.register( ve.dm.MWMathNode );
|