2012-02-10 16:57:02 +00:00
|
|
|
/**
|
2012-06-20 01:20:28 +00:00
|
|
|
* ContentEditable node for a paragraph.
|
|
|
|
*
|
2012-02-10 16:57:02 +00:00
|
|
|
* @class
|
|
|
|
* @constructor
|
2012-06-20 01:20:28 +00:00
|
|
|
* @extends {ve.ce.BranchNode}
|
|
|
|
* @param model {ve.dm.ParagraphNode} Model to observe
|
2012-02-10 16:57:02 +00:00
|
|
|
*/
|
2012-03-06 22:39:43 +00:00
|
|
|
ve.ce.ParagraphNode = function( model ) {
|
2012-02-10 16:57:02 +00:00
|
|
|
// Inheritance
|
2012-06-20 01:20:28 +00:00
|
|
|
ve.ce.BranchNode.call( this, 'paragraph', model, $( '<p></p>' ) );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Static Members */
|
2012-02-10 16:57:02 +00:00
|
|
|
|
2012-06-20 01:20:28 +00:00
|
|
|
/**
|
|
|
|
* Node rules.
|
|
|
|
*
|
|
|
|
* @see ve.ce.NodeFactory
|
|
|
|
* @static
|
|
|
|
* @member
|
|
|
|
*/
|
|
|
|
ve.ce.ParagraphNode.rules = {
|
|
|
|
'canBeSplit': true
|
2012-02-10 16:57:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
2012-06-20 01:20:28 +00:00
|
|
|
ve.ce.nodeFactory.register( 'paragraph', ve.ce.ParagraphNode );
|
2012-02-10 16:57:02 +00:00
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2012-06-20 01:20:28 +00:00
|
|
|
ve.extendClass( ve.ce.ParagraphNode, ve.ce.BranchNode );
|