mediawiki-extensions-CodeMi.../resources/modules/ve-cm/ve.ui.CodeMirror.init.js
Ed Sanders 89f52f6fbb VE: Add explicit dependency on targetLoader
Change-Id: I3d67837b462e0b79e124eff158bd7f88b5aaf63e
2020-06-30 22:47:41 +01:00

12 lines
376 B
JavaScript

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