MediaWiki REL1_34
ResourceLoaderSyntaxHighlightVisualEditorModule.php
Go to the documentation of this file.
1<?php
20
21 protected $targets = [ 'desktop', 'mobile' ];
22
28 $scripts = parent::getScript( $context );
29
30 return $scripts . Xml::encodeJsCall(
31 've.dm.MWSyntaxHighlightNode.static.addPygmentsLanguages', [
33 ],
34 ResourceLoader::inDebugMode()
35 ) . Xml::encodeJsCall(
36 've.dm.MWSyntaxHighlightNode.static.addGeshiToPygmentsMap', [
38 ],
39 ResourceLoader::inDebugMode()
40 ) . Xml::encodeJsCall(
41 've.dm.MWSyntaxHighlightNode.static.addPygmentsToAceMap', [
43 ],
44 ResourceLoader::inDebugMode()
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...
$context
Definition load.php:45