2012-05-01 00:36:22 +00:00
|
|
|
/**
|
|
|
|
* ContentEditable node for preformatted content.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @constructor
|
|
|
|
* @extends {ve.ce.BranchNode}
|
|
|
|
* @param model {ve.dm.PreformattedNode} Model to observe
|
|
|
|
*/
|
|
|
|
ve.ce.PreformattedNode = function( model ) {
|
|
|
|
// Inheritance
|
2012-05-01 02:38:42 +00:00
|
|
|
ve.ce.BranchNode.call( this, model, $( '<pre></pre>' ) );
|
2012-05-01 00:36:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Static Members */
|
|
|
|
|
|
|
|
/**
|
2012-05-02 18:29:44 +00:00
|
|
|
* Node rules.
|
|
|
|
*
|
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.PreformattedNode.rules = {
|
|
|
|
'canHaveChildren': true,
|
|
|
|
'canHaveGrandchildren': false,
|
|
|
|
'canBeSplit': true
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ce.factory.register( 'preformatted', ve.ce.PreformattedNode );
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.extendClass( ve.ce.PreformattedNode, ve.ce.BranchNode );
|