mediawiki-extensions-CodeEd.../CodeEditor.hooks.php
Brion Vibber ec233e4297 Add stub extension version of CodeEditor embedding Ace (ace.ajax.org) for editing JS and CSS pages.
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.
2011-06-09 21:50:45 +00:00

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;
}
}