mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-04 18:58:37 +00:00
Merge "Override default source mode font in placeholders too"
This commit is contained in:
commit
51eb60a81e
|
@ -5,11 +5,6 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
.ve-ui-mwWikitextSurface .ve-ce-attachedRootNode {
|
||||
/* Inherit mw-editfont setting instead of default source mode setting */
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.ve-ui-mwWikitextSurface .ve-ce-paragraphNode {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
|
|
@ -20,16 +20,17 @@ ve.ui.MWWikitextSurface = function VeUiMWWikitextSurface() {
|
|||
|
||||
// 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' ) );
|
||||
|
||||
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 = $( '<textarea>' )
|
||||
.attr( 'id', 'wpTextbox1' )
|
||||
|
|
Loading…
Reference in a new issue