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

29 lines
596 B
JavaScript
Raw Normal View History

2012-03-08 12:27:02 +00:00
/**
* Creates an ve.ce.TableCellNode object.
*
* @class
* @constructor
* @extends {ve.ce.BranchNode}
* @param {ve.dm.TableCellNode} model Table cell model to view
*/
ve.ce.TableCellNode = function( model ) {
// Inheritance
ve.ce.BranchNode.call( this, model, $( '<td></td>' ) );
2012-03-08 12:27:02 +00:00
// DOM Changes
this.$
.attr( 'style', model.getElementAttribute( 'html/style' ) )
.addClass( 've-ce-tableCellNode' );
2012-03-08 12:27:02 +00:00
};
/* Registration */
ve.ce.DocumentNode.splitRules.tableCell = {
'self': false,
'children': true
};
/* Inheritance */
ve.extendClass( ve.ce.TableCellNode, ve.ce.BranchNode );