mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-21 10:33:05 +00:00
d42a0772bb
Avoids having to update the date in every file every year, which we stopped doing. Change-Id: I7bf7aa0937eef911e00772470091753a7b06fd3d
32 lines
757 B
JavaScript
32 lines
757 B
JavaScript
/*!
|
|
* VisualEditor DataModel Surface class.
|
|
*
|
|
* @copyright See AUTHORS.txt
|
|
*/
|
|
|
|
/**
|
|
* DataModel surface.
|
|
*
|
|
* @class
|
|
* @extends ve.dm.Surface
|
|
*
|
|
* @constructor
|
|
* @param {ve.dm.Document} doc
|
|
* @param {Object} [config]
|
|
*/
|
|
ve.dm.MWWikitextSurface = function VeDmMwWikitextSurface( doc, config ) {
|
|
// Parent constructors
|
|
ve.dm.MWWikitextSurface.super.call( this, doc, ve.extendObject( config, { sourceMode: true } ) );
|
|
};
|
|
|
|
/* 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 );
|
|
};
|