From af608ccb7d385e234baf0892b863b9cfa31d743e Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 1 Jan 2018 14:01:38 +0000 Subject: [PATCH] Expand templates: Use editfont on wikitext inputs Change-Id: Ie8919b4d5caf13749d81b419aff276f7c57d7049 --- includes/specials/SpecialExpandTemplates.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialExpandTemplates.php b/includes/specials/SpecialExpandTemplates.php index 560d75a6b1..35344aaa69 100644 --- a/includes/specials/SpecialExpandTemplates.php +++ b/includes/specials/SpecialExpandTemplates.php @@ -172,6 +172,11 @@ class SpecialExpandTemplates extends SpecialPage { 'rows' => 10, 'default' => $input, 'id' => 'input', + // The following classes can be used here: + // * mw-editfont-monospace + // * mw-editfont-sans-serif + // * mw-editfont-serif + 'cssclass' => 'mw-editfont-' . $this->getUser()->getOption( 'editfont' ), ], 'removecomments' => [ 'type' => 'check', @@ -203,6 +208,8 @@ class SpecialExpandTemplates extends SpecialPage { ], ]; + $this->getOutput()->addModuleStyles( 'mediawiki.editfont.styles' ); + $form = HTMLForm::factory( 'ooui', $fields, $this->getContext() ); $form ->setSubmitTextMsg( 'expand_templates_ok' ) @@ -226,7 +233,11 @@ class SpecialExpandTemplates extends SpecialPage { $output, 10, 10, - [ 'id' => 'output', 'readonly' => 'readonly' ] + [ + 'id' => 'output', + 'readonly' => 'readonly', + 'class' => 'mw-editfont-' . $this->getUser()->getOption( 'editfont' ) + ] ); return $out; -- 2.20.1