mediawiki-extensions-CodeMi.../resources/modules/ve-cm/ve.ui.CodeMirror.init.js
Ed Sanders 3be6ae4b12 Move var declarations inline
Change-Id: I5a390c5621cefce1b396831654d54a74d0a63e9f
2021-06-15 15:50:09 +01:00

11 lines
370 B
JavaScript

mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
mw.libs.ve.targetLoader.addPlugin( function () {
var target = ve.init.mw.DesktopArticleTarget;
if ( target ) {
var index = target.static.actionGroups[ 1 ].include.indexOf( 'changeDirectionality' );
target.static.actionGroups[ 1 ].include.splice( index, 0, 'codeMirror' );
}
} );
} );