diff --git a/resources/modules/ve-cm/ve.ui.CodeMirror.init.js b/resources/modules/ve-cm/ve.ui.CodeMirror.init.js index cb7aafb9..21ec4c56 100644 --- a/resources/modules/ve-cm/ve.ui.CodeMirror.init.js +++ b/resources/modules/ve-cm/ve.ui.CodeMirror.init.js @@ -1,4 +1,4 @@ -( function () { +mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () { mw.libs.ve.targetLoader.addPlugin( function () { var index, target = ve.init.mw.DesktopArticleTarget; @@ -8,4 +8,4 @@ target.static.actionGroups[ 1 ].include.splice( index, 0, 'codeMirror' ); } } ); -}() ); +} );