Page MenuHomePhabricator

adding buttons to insert menu does not work
Closed, InvalidPublic

Description

The configuration options do not work:

$wgHooks['VEForAllToolbarConfigNormal'][] = function( &$defaultConfigNormal ) {
        $defaultConfigNormal[4]['include'][] = 'math';
        $defaultConfigNormal[4]['include'][] = 'media';
        $defaultConfigNormal[] = [ 'name' => 'reference' ];
};

After adding this iin local settings after the VEForAll call, still only "table", "special character" and "media" are displayed.

I am using MW 1.35.

I also tried

$wgHooks['VEForAllToolbarConfigWide'][] = function( &$defaultConfigWide ) {
        $defaultConfigWide[4]['include'][] = 'math';
        $defaultConfigWide[4]['include'][] = 'media';
        $defaultConfigWide[] = [ 'name' => 'reference' ];
};

with the same result.

Related Objects

Event Timeline

What version of VEForAll are you using?

0.5 (cffa12a)

VisualEditor 0.1.2
MediaWiki 1.35.9

Do these buttons show up for you in the standard VisualEditor interface? If not, the issue may be lacking the necessary extensions - Math and Cite, I think, though I'm not sure.

In the regular one I have
images and media, template, table, comment, gallery, code block, your signature

How would I add those? especially I would need template, and code block

I don't know, but for the actual issue here, it sounds like you might just need to install the Math and Cite extensions, no?

possibly. I actually don't need either. I was wondering why there is a difference in the insert menu at all and how I could configure which insert options are there.

So I'd rather we re-use this ticket to discuss how I can add the "template" and "code block" menus that are present in VE, but not in a VEForAll field.

Did I understand the "normal" vs. "wide" aspect correctly in the above code?

Okay, I'm marking this as "Invalid", since I'm guessing that the lack of those extensions is the issue. (Though these extensions should probably be mentioned in the documentation.) As for your other questions - this is of course not a general support forum. Though again, I don't know the answer, in any case.