/*! * VisualEditor UserInterface MWWikitextSurface class. * * @copyright 2011-2019 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 // The following classes can be used here: // * mw-editfont-monospace // * mw-editfont-sans-serif // * mw-editfont-serif this.$element.addClass( 've-ui-mwWikitextSurface' ); this.getView().$element.addClass( 'mw-editfont-' + mw.user.options.get( 'editfont' ) ); this.$placeholder.addClass( 'mw-editfont-' + mw.user.options.get( 'editfont' ) ); this.$textbox = $( '#wpTextbox1' ); if ( !this.$textbox.length ) { this.$textbox = $( '