diff --git a/extension.json b/extension.json index f76cfd01..81a638c5 100644 --- a/extension.json +++ b/extension.json @@ -165,6 +165,9 @@ "localBasePath": "resources", "remoteExtPath": "CodeMirror/resources" }, + "DefaultUserOptions": { + "usecodemirror": 0 + }, "QUnitTestModule": { "localBasePath": "", "remoteExtPath": "CodeMirror", diff --git a/includes/CodeMirrorHooks.php b/includes/CodeMirrorHooks.php index 4f428b23..1c8ebe0e 100644 --- a/includes/CodeMirrorHooks.php +++ b/includes/CodeMirrorHooks.php @@ -76,11 +76,10 @@ class CodeMirrorHooks { * @param array &$defaultPreferences */ public static function onGetPreferences( User $user, array &$defaultPreferences ) { - // CodeMirror is enabled by default for users. It can - // be changed by adding '$wgDefaultUserOptions['usecodemirror'] = 0;' into LocalSettings.php + // CodeMirror is disabled by default for all users. It can enabled for everyone + // by default by adding '$wgDefaultUserOptions['usecodemirror'] = 1;' into LocalSettings.php $defaultPreferences['usecodemirror'] = [ 'type' => 'api', - 'default' => '1', ]; }