mediawiki-extensions-Visual.../modules/ve/ce/nodes/ve.ce.ParagraphNode.js
Trevor Parscal a2eee63525 Updated CSS classes and rules for CE, which for the most part uses native elements
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
2012-04-04 11:54:06 -07:00

27 lines
521 B
JavaScript

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