Debian Codegraph @

extensions/VisualEditor/lib/ve/src/dm/annotations/ve.dm.CodeAnnotation.js

raw symbols SCIP
1 /*!
2 * VisualEditor DataModel CodeAnnotation class.
3 *
4 * @copyright See AUTHORS.txt
5 */
6
7 /**
8 * DataModel code annotation.
9 *
10 * Represents `<code>` and `<tt>` tags.
11 *
12 * @class
13 * @extends ve.dm.TextStyleAnnotation
14 * @constructor
15 * @param {Object} element
16 */
17 ve.dm.CodeAnnotation = function VeDmCodeAnnotation() {
18 // Parent constructor
19 ve.dm.CodeAnnotation.super.apply( this, arguments );
20 };
21
22 /* Inheritance */
23
24 OO.inheritClass( ve.dm.CodeAnnotation, ve.dm.TextStyleAnnotation );
25
26 /* Static Properties */
27
28 ve.dm.CodeAnnotation.static.name = 'textStyle/code';
29
30 ve.dm.CodeAnnotation.static.matchTagNames = [ 'code', 'tt' ];
31
32 ve.dm.CodeAnnotation.static.description = OO.ui.deferMsg( 'visualeditor-annotationbutton-code-tooltip' );
33
34 /* Registration */
35
36 ve.dm.modelRegistry.register( ve.dm.CodeAnnotation );