mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
a2eee63525
Also: * Simplified ve.ce.Surface.getLeafNode, which may be better to just be removed and be used inline in the few places it's being used. * Removed method wrapper for static function ve.ce.Surface.getLeafNode Change-Id: I1d4cf0bb7ecc8f07f030753e40a13ebef7d02daa
27 lines
500 B
JavaScript
27 lines
500 B
JavaScript
/**
|
|
* Creates an ve.ce.PreNode object.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @extends {ve.ce.LeafNode}
|
|
* @param {ve.dm.PreNode} model Pre model to view
|
|
*/
|
|
ve.ce.PreNode = function( model ) {
|
|
// Inheritance
|
|
ve.ce.LeafNode.call( this, model, $( '<pre></pre>' ), { 'pre': true } );
|
|
|
|
// DOM Changes
|
|
this.$.addClass( 've-ce-preNode' );
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.DocumentNode.splitRules.pre = {
|
|
'self': true,
|
|
'children': null
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.extendClass( ve.ce.PreNode, ve.ce.LeafNode );
|