mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Added ve.dm.Surface, ve.ce.Surface, ve.ce.Document
Change-Id: I382730e1a9f1abcb4b42499267c8dcaf76fc64e1
This commit is contained in:
parent
8518e1cc1d
commit
7b7ff5a503
12
modules/ve2/ce/ve.ce.Document.js
Normal file
12
modules/ve2/ce/ve.ce.Document.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* ContentEditable document.
|
||||
*
|
||||
* @class
|
||||
* @constructor
|
||||
* @param model {ve.dm.Document} Model to observe
|
||||
*/
|
||||
ve.ce.Document = function( model ) {
|
||||
// Properties
|
||||
this.documentModel = model;
|
||||
this.documentNode = new ve.ce.DocumentNode( model.getDocumentNode() );
|
||||
};
|
12
modules/ve2/ce/ve.ce.Surface.js
Normal file
12
modules/ve2/ce/ve.ce.Surface.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* ContentEditable surface.
|
||||
*
|
||||
* @class
|
||||
* @constructor
|
||||
* @param model {ve.dm.Surface} Model to observe
|
||||
*/
|
||||
ve.ce.Surface = function( model ) {
|
||||
// Properties
|
||||
this.surfaceModel = model;
|
||||
this.documentView = new ve.ce.Document( model.getDocument() );
|
||||
};
|
11
modules/ve2/dm/ve.dm.Surface.js
Normal file
11
modules/ve2/dm/ve.dm.Surface.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* DataModel surface.
|
||||
*
|
||||
* @class
|
||||
* @constructor
|
||||
* @param {ve.dm.Document} doc Document model to create surface for
|
||||
*/
|
||||
ve.dm.Surface = function( doc ) {
|
||||
// Properties
|
||||
this.documentModel = doc;
|
||||
};
|
Loading…
Reference in a new issue