mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 10:59:56 +00:00
366219e953
Change-Id: Id46d5ef9c8a585784b8fbd55418d012fff96823f
32 lines
811 B
JavaScript
32 lines
811 B
JavaScript
/*!
|
|
* VisualEditor DataModel Surface class.
|
|
*
|
|
* @copyright 2011-2018 VisualEditor Team and others; see http://ve.mit-license.org
|
|
*/
|
|
|
|
/**
|
|
* 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 );
|
|
};
|