2012-05-01 00:36:22 +00:00
|
|
|
/**
|
|
|
|
* ContentEditable node for a table.
|
2012-05-14 22:05:09 +00:00
|
|
|
*
|
2012-05-01 00:36:22 +00:00
|
|
|
* @class
|
|
|
|
* @constructor
|
|
|
|
* @extends {ve.ce.BranchNode}
|
|
|
|
* @param model {ve.dm.TableNode} Model to observe
|
|
|
|
*/
|
|
|
|
ve.ce.TableNode = function( model ) {
|
|
|
|
// Inheritance
|
2012-05-25 03:51:31 +00:00
|
|
|
ve.ce.BranchNode.call( this, 'table', model, $( '<table border="1" cellpadding="5" cellspacing="5"></table>' ) );
|
2012-05-01 00:36:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Static Members */
|
|
|
|
|
|
|
|
/**
|
2012-05-02 18:29:44 +00:00
|
|
|
* Node rules.
|
2012-05-14 22:05:09 +00:00
|
|
|
*
|
2012-05-01 00:36:22 +00:00
|
|
|
* @see ve.ce.NodeFactory
|
2012-05-02 18:29:44 +00:00
|
|
|
* @static
|
|
|
|
* @member
|
2012-05-01 00:36:22 +00:00
|
|
|
*/
|
|
|
|
ve.ce.TableNode.rules = {
|
|
|
|
'canBeSplit': false
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
2012-05-31 22:20:58 +00:00
|
|
|
ve.ce.nodeFactory.register( 'table', ve.ce.TableNode );
|
2012-05-01 00:36:22 +00:00
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.extendClass( ve.ce.TableNode, ve.ce.BranchNode );
|