2018-09-24 13:25:28 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor ContentEditable MWInlineSyntaxHighlightNode class.
|
|
|
|
*
|
2024-02-29 15:13:03 +00:00
|
|
|
* @copyright VisualEditor Team and others
|
2018-09-24 13:25:28 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ContentEditable MediaWiki inline syntax highlight node.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @abstract
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
ve.ce.MWInlineSyntaxHighlightNode = function VeCeMWInlineSyntaxHighlightNode() {
|
|
|
|
// Parent method
|
|
|
|
ve.ce.MWInlineExtensionNode.super.apply( this, arguments );
|
|
|
|
|
|
|
|
// Mixin method
|
|
|
|
ve.ce.MWSyntaxHighlightNode.call( this );
|
|
|
|
};
|
|
|
|
|
|
|
|
OO.inheritClass( ve.ce.MWInlineSyntaxHighlightNode, ve.ce.MWInlineExtensionNode );
|
|
|
|
|
|
|
|
OO.mixinClass( ve.ce.MWInlineSyntaxHighlightNode, ve.ce.MWSyntaxHighlightNode );
|
|
|
|
|
|
|
|
ve.ce.MWInlineSyntaxHighlightNode.static.name = 'mwInlineSyntaxHighlight';
|
|
|
|
|
|
|
|
ve.ce.MWInlineSyntaxHighlightNode.static.primaryCommandName = 'syntaxhighlightInspector';
|
|
|
|
|
2019-07-31 15:41:15 +00:00
|
|
|
ve.ce.MWInlineSyntaxHighlightNode.static.getDescription = function ( model ) {
|
|
|
|
return ve.getProp( model.getAttribute( 'mw' ), 'attrs', 'lang' );
|
|
|
|
};
|
|
|
|
|
2018-09-24 13:25:28 +00:00
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWInlineSyntaxHighlightNode );
|