Jump to content

Topic on Project:Support desk

Enable all namespaces for VisualEditor

6
81.22.162.228 (talkcontribs)

Hi

Is it possible to enable VisualEditor for all namespaces? Like Category? I found this configuratoin option but not sure how to use it:

Each configuration option is shown without the $wgVisualEditor prefix for brevity.
Namespaces = array_merge(
	$wgContentNamespaces,
	array( NS_USER )
)
81.22.162.228 (talkcontribs)

Here is the answer if someone is struggling with this. Add namespaces between () in VisualEditor.php.:

// Namespaces to enable VisualEditor in

$wgVisualEditorNamespaces = array_merge( $wgContentNamespaces, array( NS_USER, NS_CATEGORY ) );


Florianschmidtwelzow (talkcontribs)

Hi,

it's never a good idea to change files in mediawiki core or extension files itself. It should work, if you add

$wgVisualEditorNamespaces = array_merge( $wgContentNamespaces, array( NS_USER ) );

in your LocalSettings,php directly after the require_once line.

Matt Wieland (talkcontribs)

I have been trying this and it doesn't work. There's no VisualEditor option in the "help" namespaces.

I added the following line after the require_once line in the LocalSettings.php:

$wgVisualEditorNamespaces = array_merge( $wgContentNamespaces, array( NS_USER, NS_HILFE, NS_HELP, NS_BENUTZER ) );

Since the wiki is in German I tried adding the namespaces in German and English.

Any ideas?

HerrTaschenbier (talkcontribs)

Did you find a solution?

I'm trying to enable the editor on ":Portal" pages like https://en.wikipedia.org/wiki/Wikipedia:Portal

I guess it's disabled on some pages for security reasons, like CSS is on the login page. Even though I can't really see security issues in this case.

Beatlicker (talkcontribs)

@Matt Wieland

$wgVisualEditorAvailableNamespaces = [

    NS_MAIN => true,

    NS_USER => true,

NS_HELP => true,

    102 => true,

    "_merge_strategy" => "array_plus"

];