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