mediawiki-extensions-Visual.../modules/ve/ce/nodes/ve.ce.ParagraphNode.js

34 lines
605 B
JavaScript
Raw Normal View History

2012-02-10 16:57:02 +00:00
/**
* ContentEditable node for a paragraph.
*
2012-02-10 16:57:02 +00:00
* @class
* @constructor
* @extends {ve.ce.BranchNode}
* @param model {ve.dm.ParagraphNode} Model to observe
2012-02-10 16:57:02 +00:00
*/
ve.ce.ParagraphNode = function( model ) {
2012-02-10 16:57:02 +00:00
// Inheritance
ve.ce.BranchNode.call( this, 'paragraph', model, $( '<p></p>' ) );
};
/* Static Members */
2012-02-10 16:57:02 +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 */
ve.ce.nodeFactory.register( 'paragraph', ve.ce.ParagraphNode );
2012-02-10 16:57:02 +00:00
/* Inheritance */
ve.extendClass( ve.ce.ParagraphNode, ve.ce.BranchNode );