Skip to content

Commit

Permalink
Configure JsonConfig and enable CodeEditor (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
physikerwelt authored Sep 27, 2023
1 parent 71a067f commit a3eb472
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mediawiki/LocalSettings.d/CodeEditingExtension.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
<?php
wfLoadExtension( 'JsonConfig' );
//wfLoadExtension( 'CodeEditor' ); requires wiki editor that is not yet availible.
// $wgJsonConfigEnableLuaSupport = true; // required to use JsonConfig in Lua
// Content model is 'JsonConfig.CodeMeta'
// Model class is set to NULL to allow non-validated data
$wgJsonConfigModels['JsonConfig.CodeMeta'] = null;
$wgJsonConfigs['JsonConfig.CodeMeta'] = [
'namespace' => NS_CODEMETA,
'nsName' => 'CodeMeta',
'pattern' => '/.\.json/',
];
wfLoadExtension( 'CodeEditor' );
$wgDefaultUserOptions['usebetatoolbar'] = 1; // user option provided by WikiEditor extension
wfLoadExtension( 'CodeMirror' );
// Enables use of CodeMirror by default but still allow users to disable it
Expand Down

0 comments on commit a3eb472

Please sign in to comment.