mediawiki-extensions-Visual.../modules/ve-mw/ui/widgets/ve.ui.MWSurfaceWidget.js
Ed Sanders 472c98053d Ensure placeholder styling matches document
Bug: T96593
Change-Id: I23bb1393a9a6779b70ed1004496f3ca6ff038e43
2015-06-30 09:47:34 +01:00

32 lines
840 B
JavaScript

/*!
* VisualEditor UserInterface MWSurfaceWidget class.
*
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Creates an ve.ui.MWSurfaceWidget object.
*
* @class
* @abstract
* @extends ve.ui.SurfaceWidget
*
* @constructor
* @param {ve.dm.Document} doc Document model
* @param {Object} [config] Configuration options
*/
ve.ui.MWSurfaceWidget = function VeUiMWSurfaceWidget( doc, config ) {
// Parent constructor
ve.ui.MWSurfaceWidget.super.call( this, doc, config );
// Initialization
this.$element.addClass( 've-ui-mwSurfaceWidget' );
this.surface.getView().$element.addClass( 'mw-body-content' );
this.surface.$placeholder.addClass( 'mw-body-content' );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWSurfaceWidget, ve.ui.SurfaceWidget );