MediaWiki fundraising/REL1_35
ResourceLoaderSyntaxHighlightVisualEditorModule.php
Go to the documentation of this file.
1<?php
20
21 protected $targets = [ 'desktop', 'mobile' ];
22
27 public function getScript( ResourceLoaderContext $context ) {
28 $scripts = parent::getScript( $context );
29
30 return $scripts . Xml::encodeJsCall(
31 've.dm.MWSyntaxHighlightNode.static.addPygmentsLanguages', [
33 ],
35 ) . Xml::encodeJsCall(
36 've.dm.MWSyntaxHighlightNode.static.addGeshiToPygmentsMap', [
38 ],
40 ) . Xml::encodeJsCall(
41 've.dm.MWSyntaxHighlightNode.static.addPygmentsToAceMap', [
43 ],
45 );
46 }
47
52 private function getPygmentsLanguages() {
53 return array_keys( require __DIR__ . '/../SyntaxHighlight.lexers.php' );
54 }
55
59 public function enableModuleContentVersion() {
60 return true;
61 }
62
66 public function supportsURLLoading() {
67 return false;
68 }
69}
Context object that contains information about the state of a specific ResourceLoader web request.
Module based on local JavaScript/CSS files.
array $scripts
List of paths to JavaScript files to always include.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
static inDebugMode()
Determine whether debug mode is on.