mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-15 02:04:02 +00:00
c9b4aa65fd
This patch makes initialization easier and cheaper. Since only the PhpTags extension uses the CodeMirrorGetAdditionalResources hook it was removed. Instead, the CodeMirrorPluginModules and CodeMirrorTagModes properties are used in extension.json file. This patch adds ext.CodeMirror.lib.mode.php module for the PhpTags extension (with dependences). In CodeMirror there are a lot of modes they will be registered on request (if they will be requered for extensions). Examples of integration: * Cite: I1bf156fa813af4d5f891619f692047bbdb8a1a86 * PhpTags: Ie339f0475e63885e603defaee2cdcccd6a95fafc Bug: T163238 Change-Id: Idb7a1a5769a1047ef2f7cd25a7152f73a6613225
8 lines
204 B
JavaScript
8 lines
204 B
JavaScript
( function ( mw ) {
|
|
var config = mw.config.get( 'extCodeMirrorConfig' );
|
|
|
|
if ( config.pluginModules && config.pluginModules.length > 0 ) {
|
|
mw.loader.load( config.pluginModules );
|
|
}
|
|
}( mediaWiki ) );
|