/*! * VisualEditor UserInterface MWWikitextSurface class. * * @copyright 2011-2020 VisualEditor Team and others; see http://ve.mit-license.org */ /** * @class * @extends ve.ui.Surface * * @constructor * @param {HTMLDocument|Array|ve.dm.LinearData|ve.dm.Document} dataOrDoc Document data to edit * @param {Object} [config] Configuration options */ ve.ui.MWWikitextSurface = function VeUiMWWikitextSurface() { var surface = this; // Parent constructor ve.ui.MWWikitextSurface.super.apply( this, arguments ); // Initialization this.$element.addClass( 've-ui-mwWikitextSurface' ); // The following classes are used here: // * mw-editfont-monospace // * mw-editfont-sans-serif // * mw-editfont-serif this.getView().$element.addClass( 'mw-editfont-' + mw.user.options.get( 'editfont' ) ); // eslint-disable-next-line mediawiki/class-doc this.$placeholder.addClass( 'mw-editfont-' + mw.user.options.get( 'editfont' ) ); // eslint-disable-next-line no-jquery/no-global-selector this.$textbox = $( '#wpTextbox1' ); if ( !this.$textbox.length ) { this.$textbox = $( '