mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 02:51:50 +00:00
e34ec4b479
Change-Id: Ibe53292f7269736750e03da49e5bb5913c0124ab
36 lines
661 B
JavaScript
36 lines
661 B
JavaScript
/**
|
|
* ContentEditable node for a paragraph.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @extends {ve.ce.BranchNode}
|
|
* @param model {ve.dm.ParagraphNode} Model to observe
|
|
*/
|
|
ve.ce.ParagraphNode = function( model ) {
|
|
// Inheritance
|
|
ve.ce.BranchNode.call( this, 'paragraph', model, $( '<p></p>' ) );
|
|
};
|
|
|
|
/* Static Members */
|
|
|
|
/**
|
|
* Node rules.
|
|
*
|
|
* @see ve.ce.NodeFactory
|
|
* @static
|
|
* @member
|
|
*/
|
|
ve.ce.ParagraphNode.rules = {
|
|
'canHaveChildren': true,
|
|
'canHaveGrandchildren': false,
|
|
'canBeSplit': true
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.factory.register( 'paragraph', ve.ce.ParagraphNode );
|
|
|
|
/* Inheritance */
|
|
|
|
ve.extendClass( ve.ce.ParagraphNode, ve.ce.BranchNode );
|