| 1 | /*! |
| 2 | * VisualEditor ContentEditable BoldAnnotation class. |
| 3 | * |
| 4 | * @copyright See AUTHORS.txt |
| 5 | */ |
| 6 | |
| 7 | /** |
| 8 | * ContentEditable bold annotation. |
| 9 | * |
| 10 | * @class |
| 11 | * @extends ve.ce.TextStyleAnnotation |
| 12 | * @constructor |
| 13 | * @param {ve.dm.BoldAnnotation} model Model to observe |
| 14 | * @param {ve.ce.ContentBranchNode} [parentNode] Node rendering this annotation |
| 15 | * @param {Object} [config] Configuration options |
| 16 | */ |
| 17 | ve.ce.BoldAnnotation = function VeCeBoldAnnotation() { |
| 18 | // Parent constructor |
| 19 | ve.ce.BoldAnnotation.super.apply( this, arguments ); |
| 20 | |
| 21 | // DOM changes |
| 22 | this.$element.addClass( 've-ce-boldAnnotation' ); |
| 23 | }; |
| 24 | |
| 25 | /* Inheritance */ |
| 26 | |
| 27 | OO.inheritClass( ve.ce.BoldAnnotation, ve.ce.TextStyleAnnotation ); |
| 28 | |
| 29 | /* Static Properties */ |
| 30 | |
| 31 | ve.ce.BoldAnnotation.static.name = 'textStyle/bold'; |
| 32 | |
| 33 | ve.ce.BoldAnnotation.static.tagName = 'b'; |
| 34 | |
| 35 | /* Registration */ |
| 36 | |
| 37 | ve.ce.annotationFactory.register( ve.ce.BoldAnnotation ); |