2012-07-19 00:11:26 +00:00
|
|
|
/**
|
|
|
|
* VisualEditor content editable ParagraphNode class.
|
2012-07-19 21:25:16 +00:00
|
|
|
*
|
2012-07-19 00:11:26 +00:00
|
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
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 );
|