Skip to content

Commit

Permalink
change used js hook in attempt to better time loading of codemirror (#15
Browse files Browse the repository at this point in the history
)
  • Loading branch information
FO-nTTaX committed Feb 26, 2024
1 parent aaf4c49 commit 0d35c2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions composer.json
Expand Up @@ -21,5 +21,10 @@
"composer sqllint"
],
"fix": "phpcbf"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
2 changes: 1 addition & 1 deletion resources/scripts/codemirror.js
Expand Up @@ -423,7 +423,7 @@ if ( !String.prototype.includes ) {
codeMirror = codeMirrorDesktop;
}
if ( codeMirror ) {
mw.hook( 'wikipage.editform' ).add( function() {
mw.hook( 'wikiEditor.toolbarReady' ).add( function() {
enableCodeMirror();

// define JQuery hook for searching and replacing text using
Expand Down

0 comments on commit 0d35c2a

Please sign in to comment.