diff --git a/resources/ext.CodeMirror.WikiEditor.js b/resources/ext.CodeMirror.WikiEditor.js index 407bbb62..2ea45820 100644 --- a/resources/ext.CodeMirror.WikiEditor.js +++ b/resources/ext.CodeMirror.WikiEditor.js @@ -356,12 +356,10 @@ function init() { } ); } - $( function () { - // Add CodeMirror button to the enhanced editing toolbar. - mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { - $textbox1 = $textarea; - addCodeMirrorToWikiEditor(); - } ); + // Add CodeMirror button to the enhanced editing toolbar. + mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { + $textbox1 = $textarea; + addCodeMirrorToWikiEditor(); } ); // Synchronize textarea with CodeMirror before leaving