mediawiki-extensions-Visual.../modules/ve2/ce/ve.ce.Surface.js

24 lines
477 B
JavaScript
Raw Normal View History

/**
* ContentEditable surface.
*
* @class
* @constructor
* @param model {ve.dm.Surface} Model to observe
*/
ve.ce.Surface = function( $container, model ) {
// Inheritance
ve.EventEmitter.call( this );
// Properties
this.model = model;
this.documentView = new ve.ce.Document( model.getDocument() );
this.$ = $container;
// Initialization
this.$.append( this.documentView.documentNode.$ );
};
/* Inheritance */
ve.extendClass( ve.ce.Surface, ve.EventEmitter );