/*! * 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' ); this.getView().$element.add( this.$placeholder ) .removeClass( 've-ui-surface-source-font' ) // The following classes are used here: // * mw-editfont-monospace // * mw-editfont-sans-serif // * mw-editfont-serif .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 = $( '