2016-05-26 12:08:26 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor DataModel Surface class.
|
|
|
|
*
|
2019-01-01 13:24:23 +00:00
|
|
|
* @copyright 2011-2019 VisualEditor Team and others; see http://ve.mit-license.org
|
2016-05-26 12:08:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DataModel surface.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.dm.Surface
|
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.dm.Document} doc
|
2018-02-27 12:15:25 +00:00
|
|
|
* @param {Object} [config]
|
2016-05-26 12:08:26 +00:00
|
|
|
*/
|
2018-02-27 12:15:25 +00:00
|
|
|
ve.dm.MWWikitextSurface = function VeDmMwWikitextSurface( doc, config ) {
|
2016-05-26 12:08:26 +00:00
|
|
|
// Parent constructors
|
2018-02-27 12:15:25 +00:00
|
|
|
ve.dm.MWWikitextSurface.super.call( this, doc, ve.extendObject( config, { sourceMode: true } ) );
|
2016-05-26 12:08:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.dm.MWWikitextSurface, ve.dm.Surface );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
ve.dm.MWWikitextSurface.prototype.getFragment = function ( selection, noAutoSelect, excludeInsertions ) {
|
|
|
|
return new ve.dm.MWWikitextSurfaceFragment( this, selection || this.selection, noAutoSelect, excludeInsertions );
|
|
|
|
};
|