/*! * VisualEditor UserInterface MWWikitextSurface class. * * @copyright See AUTHORS.txt */ /** * @class * @extends ve.ui.Surface * * @constructor * @param {ve.init.Target} target * @param {HTMLDocument|Array|ve.dm.LinearData|ve.dm.Document} dataOrDoc Document data to edit * @param {Object} [config] Configuration options */ ve.ui.MWWikitextSurface = function VeUiMWWikitextSurface() { // 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 = $( '