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

41 lines
808 B
JavaScript
Raw Normal View History

/**
* VisualEditor content editable TableNode class.
*
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
2012-03-08 12:27:02 +00:00
/**
* ContentEditable node for a table.
*
2012-03-08 12:27:02 +00:00
* @class
* @constructor
* @extends {ve.ce.BranchNode}
* @param model {ve.dm.TableNode} Model to observe
2012-03-08 12:27:02 +00:00
*/
ve.ce.TableNode = function( model ) {
// Inheritance
ve.ce.BranchNode.call( this, 'table', model, $( '<table border="1" cellpadding="5" cellspacing="5"></table>' ) );
2012-03-08 12:27:02 +00:00
};
/* Static Members */
2012-03-08 12:27:02 +00:00
/**
* Node rules.
*
* @see ve.ce.NodeFactory
* @static
* @member
*/
ve.ce.TableNode.rules = {
'canBeSplit': false
2012-03-08 12:27:02 +00:00
};
/* Registration */
ve.ce.nodeFactory.register( 'table', ve.ce.TableNode );
2012-03-08 12:27:02 +00:00
/* Inheritance */
ve.extendClass( ve.ce.TableNode, ve.ce.BranchNode );