Topic on Extension talk:CodeMirror

Highlighting does not work with Visual Editor

6
87.122.24.188 (talkcontribs)

Hi everybody.


According to special-page I have successfully installed extensions in my mediawiki 1.36.1:

CodeMirror 4.0.0 (ed712c3) 03:16, 25. Mai 2021

VisualEditor 0.1.2 (64b7bb3) 04:22, 25. Mai 2021


But I can't enable syntax highlighting in options, it is shown as menu item, but grayed out


Here's my LocalSettings.php:

wfLoadExtension( 'CodeMirror' ); //siehe einstellungen weiter unten

wfLoadExtension( 'VisualEditor' ); //siehe einstellungen weiter unten

#einstellungen codemirror

$wgDefaultUserOptions['usecodemirror'] = 1;

# Enable bracket matching in CodeMirror

$wgCodeMirrorEnableBracketMatching = true;

#Enable accessible colors in CodeMirror

$wgCodeMirrorAccessibilityColors = true;

# Enable line numbering in CodeMirror

# defaults to the template namespace `[ NS_TEMPLATE ]`

# `null` enables it for all namespace

# [] for disabling everywhere

$wgCodeMirrorLineNumberingNamespaces = null;

#einstellungen visualeditor

$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

$wgVisualEditorEnableWikitextBetaFeature = true;


If I change to source-editing I only see black text and have no icon-bar

I tested with Firefox 89 and Vivaldi 4.0


Thanks allready for upcoming suggestions

Thiemo Kreuz (WMDE) (talkcontribs)

With $wgVisualEditorEnableWikitextBetaFeature = true; the "New wikitext mode" is a Beta feature. You need to enable this first in your user's Beta feature settings. Alternatively you can try to set $wgVisualEditorEnableWikitext = true;.

87.122.24.188 (talkcontribs)

I already read about the Beta features. But how do I enable them in my selfhosted mediawiki?

Do i need to download and install Extension:BetaFeatures ?


Setting $wgVisualEditorEnableWikitext = true; does not work for me :(

uncommenting $wgVisualEditorEnableWikitextBetaFeature = true; also does not work.

Thiemo Kreuz (WMDE) (talkcontribs)
87.122.24.188 (talkcontribs)

ok i have installed the extension.

How to enable the highlighting as default for all users?

Although the setting $wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

was set, I had to enable it in the new beta menu.

Thiemo Kreuz (WMDE) (talkcontribs)

The point of Beta features is to let the users opt-in if they want. If you want it the other way around you need to use $wgVisualEditorEnableWikitext = true;. According to this code the syntax highlighting feature should be enabled by default then.

Reply to "Highlighting does not work with Visual Editor"