Merge "Fire a hook when the CodeMirror editor is switched"

This commit is contained in:
jenkins-bot 2021-07-13 04:39:52 +00:00 committed by Gerrit Code Review
commit 79284952de

View file

@ -195,6 +195,8 @@
if ( mw.config.get( 'wgCodeMirrorAccessibilityColors' ) ) {
$codeMirror.addClass( 'cm-mw-accessible-colors' );
}
mw.hook( 'ext.CodeMirror.switch' ).fire( true, $codeMirror );
} );
}
@ -253,6 +255,8 @@
$textbox1.prop( 'selectionStart', selectionStart );
$textbox1.prop( 'selectionEnd', selectionEnd );
$textbox1.scrollTop( scrollTop );
mw.hook( 'ext.CodeMirror.switch' ).fire( false, $textbox1 );
} else {
enableCodeMirror();
setCodeEditorPreference( true );