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

27 lines
518 B
JavaScript
Raw Normal View History

2012-02-10 16:57:02 +00:00
/**
* Creates an ve.ce.ParagraphNode object.
2012-02-10 16:57:02 +00:00
*
* @class
* @constructor
* @extends {ve.ce.LeafNode}
2012-02-10 16:57:02 +00:00
* @param {ve.dm.ParagraphNode} model Paragraph model to view
*/
ve.ce.ParagraphNode = function( model ) {
2012-02-10 16:57:02 +00:00
// Inheritance
ve.ce.LeafNode.call( this, model, $( '<p></p>' ) );
2012-02-10 16:57:02 +00:00
// DOM Changes
this.$.addClass( 'es-paragraphView' );
};
/* Registration */
ve.ce.DocumentNode.splitRules.paragraph = {
2012-02-10 16:57:02 +00:00
'self': true,
'children': null
};
/* Inheritance */
ve.extendClass( ve.ce.ParagraphNode, ve.ce.LeafNode );