mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-27 16:40:07 +00:00
ec233e4297
Simply using the existing gadget version modified to load Ace from the extension directory for now, will integrate better into WikiEditor and use ResourceLoader to load Ace itself in upcoming commits.
12 lines
259 B
PHP
12 lines
259 B
PHP
<?php
|
|
|
|
class CodeEditorHooks {
|
|
public static function editPageShowEditFormInitial( &$toolbar ) {
|
|
global $wgOut, $wgTitle;
|
|
if ( $wgTitle->isCssOrJsPage() || $wgTitle->isCssJsSubpage() ) {
|
|
$wgOut->addModules( 'ext.codeEditor' );
|
|
}
|
|
return true;
|
|
}
|
|
}
|