mediawiki-extensions-Visual.../modules/ve2/ce/nodes/ve.ce.ImageNode.js

32 lines
574 B
JavaScript
Raw Normal View History

/**
* ContentEditable node for an image.
*
* @class
* @constructor
* @extends {ve.ce.LeafNode}
* @param model {ve.dm.ImageNode} Model to observe
*/
ve.ce.ImageNode = function( model ) {
// Inheritance
ve.ce.LeafNode.call( this, model, $( '<img>' ) );
};
/* Static Members */
/**
* @see ve.ce.NodeFactory
*/
ve.ce.ImageNode.rules = {
'canHaveChildren': false,
'canHaveGrandchildren': false,
'canBeSplit': false
};
/* Registration */
ve.ce.factory.register( 'image', ve.ce.ImageNode );
/* Inheritance */
ve.extendClass( ve.ce.ImageNode, ve.ce.LeafNode );