mediawiki-extensions-Visual.../modules/ve/ce/nodes/ve.ce.PreNode.js

27 lines
500 B
JavaScript
Raw Normal View History

2012-03-08 12:27:02 +00:00
/**
* 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 } );
2012-03-08 12:27:02 +00:00
// DOM Changes
this.$.addClass( 've-ce-preNode' );
2012-03-08 12:27:02 +00:00
};
/* Registration */
ve.ce.DocumentNode.splitRules.pre = {
'self': true,
'children': null
};
/* Inheritance */
ve.extendClass( ve.ce.PreNode, ve.ce.LeafNode );