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
656 B
JavaScript
36 lines
656 B
JavaScript
/**
|
|
* ContentEditable node for a list item.
|
|
*
|
|
* @class
|
|
* @constructor
|
|
* @extends {ve.ce.BranchNode}
|
|
* @param model {ve.dm.ListItemNode} Model to observe
|
|
*/
|
|
ve.ce.ListItemNode = function( model ) {
|
|
// Inheritance
|
|
ve.ce.BranchNode.call( this, 'listItem', model, $( '<li></li>' ) );
|
|
};
|
|
|
|
/* Static Members */
|
|
|
|
/**
|
|
* Node rules.
|
|
*
|
|
* @see ve.ce.NodeFactory
|
|
* @static
|
|
* @member
|
|
*/
|
|
ve.ce.ListItemNode.rules = {
|
|
'canHaveChildren': true,
|
|
'canHaveGrandchildren': true,
|
|
'canBeSplit': false
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.factory.register( 'listItem', ve.ce.ListItemNode );
|
|
|
|
/* Inheritance */
|
|
|
|
ve.extendClass( ve.ce.ListItemNode, ve.ce.BranchNode );
|