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

41 lines
792 B
JavaScript
Raw Normal View History

/**
* VisualEditor content editable ParagraphNode class.
*
* @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
/**
* 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 );