Jump to navigation Jump to search

About this board

Previous discussion was archived at Talk:VisualEditor/Archive 1 on 2015-09-01.

Enabling VE in Category Page? And enable VE always.

AmazingTrans (talkcontribs)

I'm wondering

  1. when i go to a category page, how can i enable visualeditor in that page?
  2. when i search for a page that doesn't exist, Create the page "Test" on this wiki! See also the search results found. By clicking the Test word, it always automatically select Create Source. Is there anyway I can have it select Visual Editor first?
AmazingTrans (talkcontribs)

I have tried the following, and the category doesn't seem to have VE Edit available, only sourceedit. I notice the NS_USER is not necessary, somehow VE is always shown there.

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

I also tried this, and it didn't work.

$wgVisualEditorNamespaces[] = NS_CATEGORY;
Elitre (WMF) (talkcontribs)
AmazingTrans (talkcontribs)

VE is already working in Main namespace. Just not working in Talk, and Category namespace.

This is on my private wiki.

Whatamidoing (WMF) (talkcontribs)

I believe that the single edit tab feature will solve #2. (talkcontribs)

Since I've updated to MediaWiki 1.26.2 and the latest VisualEditor I also cannot enable VisualEditor for category pages. Before the Update (1.25.3) I could edit category pages. (talkcontribs)

I have the same issue. I would like to enable VisualEditor for Category pages. Also running 1.26.2.

Has anyone managed to enable this yet? (talkcontribs)

Add this to your LocalSettings.php

// Enable VisualEditor in Category Page

$wgVisualEditorAvailableNamespaces = array(


); (talkcontribs)

It can easily be done if you are using custom fields like pods etc. Just extend the current category and add visual editor as field

Reply to "Enabling VE in Category Page? And enable VE always."

VE has problems with editing <ref name="XYZ" /> link

Der Keks (talkcontribs)
Der Keks (talkcontribs)
Reply to "VE has problems with editing <ref name="XYZ" /> link"

Visual Editor does not seem to be compatible with drag and drop or copy and pasting images?

Thedonquixotic (talkcontribs)
Reply to "Visual Editor does not seem to be compatible with drag and drop or copy and pasting images?"

mediawiki.notification API z-index issue?

Revansx (talkcontribs)

Hi, I have a bit of javascript that I run in Common.js that uses the command "mw.loader.load( ['mediawiki.notification', 'mediawiki.api'] );" on any page open for edit to define a standard mediawiki pop-up notification. It is immaterial, to the question but the purpose of the pop-up notification is to alert the (enterprise SSO immutable session) user that their session may be expiring and to save their work..

The script works great for action=edit, and action=formedit urls, but with veaction=edit urls the pop-up notification window is "behind" the VE editor elements such that the user can not interact with it.

The script is benign and effortless to test.

I am running:

  • MW:1.30 and
  • VisualEditor: 0.1.0 (61f161a) 14:07, 2 October 2017

The link to my javascript is:

As you can see, I set the z-index value to an extremely large value so I have ruled out the easiest of fixes.

Can someone take a peek at this and help me identify if the problem is a deficiency in the javascript, or if it is an issue with the way VE elements are stacked.

Thank you in advance.

- User:revansx (Rich)

Matma Rex (talkcontribs)

I don't see this problem on my local testing wiki (using latest Git master of MW and VE, 1.32-alpha).

I ran your script and the notification displays on top of everything: after scrolling down, it repositions itself, but stays on top of the editing toolbar: In both cases the links in the notification are clickable.

It is possible that the earlier versions you're using had some issue that caused this to not display correctly. I couldn't easily find the patch which might have fixed it, though :/

Revansx (talkcontribs)

hmm.. thank you for looking at this. I'm glad it worked for you. I'm not in a position where I could simply upgrade and see if that solves the problem. I'm really hoping to figure this out for my current setup. I'm currently inspecting and tinkering with elements in the developers console hoping to figure out what is on top of what.

MarkAHershberger (talkcontribs)

Note that I've tried this using my user js on a 1.27 wiki and couldn't reproduce @Revansx's problem.

Revansx (talkcontribs)

Workaround/Fix - From the browser developers tools, I found that the problem is related to the CSS parameters "pointer-events:none; opacity:0.5;" appplied to the element .ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay ), .ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent

I was able to functionally solve the problem by adding #mw-notification-area { pointer-events:initial; opacity:1.0; } into Mediawiki.css.

Clearly this is not a correct solution to the root cause. If anyone can imagine why the notification is being styled this way, please let me know. thanks!

Revansx (talkcontribs)
Reply to "mediawiki.notification API z-index issue?"

Can you remove tools/gadgets from the toolbar?

JoshHarry (talkcontribs)

My wiki doesn't require all of the tools/gadgets in the default Visual Editor toolbar, is there a way I can the remove tools that are not needed?

Whatamidoing (WMF) (talkcontribs)

Which tools do you want to remove?

I think that some of them automatically disappear if not installed on the local wiki (cite.php, maps, heirolyphics, etc.).

JoshHarry (talkcontribs)

Thanks for the reply

Here is a list of the tools I (probably) want to remove:

From the Format Paragraph tab: Sub-headings 3 and 4, Preformatted, Block Quote and Page Title

From Structure: the increase and decrease indentation opitions

From Insert: Comment, Hieroglyphs, Musical Notation, Signatures, Gallery, Chem Formula, Math Formula, Map, Code Block, Graph, Ref List

From Style Text: basically all apart from Bold and Italics

and the Cite tab (but you already mentioned that won't appear if not installed)

Whatamidoing (WMF) (talkcontribs)

I think – but note that I'm neither omnsicient nor a dev – that Hieroglyphs, Musical Notation, Chem Formula, Math Formula, Map, and Graph (and the ref items) will automagically fail to appear. I think that those are all controlled by extensions and that they're meant to "fail gracefully".

That leaves Comment, Signatures, Gallery, Code Block, and the character stylings that will probably need direct intervention. I'd encourage you to keep the "Language" item in the character stylings menu; otherwise, if anyone ever posts an Arabic or Hebrew character, it could get a bit messy.

I'll ask around and see if I can find out more about how to do this. @Deskana (WMF) and I were talking about adding an item the other day; maybe he will have some ideas about how to remove one.

Deskana (WMF) (talkcontribs)

Almost anything is possible in code, so yes, it would be technically possible for you to do this. That said, you'd have to change the JavaScript code in VisualEditor yourself, and given that it's not designed for menu items to be swapped in and out arbitrarily, it probably won't be very easy for you to do so.

Reply to "Can you remove tools/gadgets from the toolbar?"
Virgobowl (talkcontribs)

Where can I find documentation for modifying the toolbar in a standalone installation of the VisualEditor? Specifically I'd like to add new styling/formatting options

Whatamidoing (WMF) (talkcontribs)
Reply to "Modifying toolbar"

Parsoid/RESTbase working for Main Page but 404ing for sub-pages

Arshiya1234 (talkcontribs)

@Christian 1234567 @Williams

thanks in advance

i have installed visual editor 1.30 with restbase ,parsoid and nodejs and visual editor is working fine for first page

for example: Mediawiki/index.php/Main_Page -working

but it is failing 404 for subpages

for example: Mediawiki/index.php/Main_Page/subpage -failing

Reply to "Parsoid/RESTbase working for Main Page but 404ing for sub-pages"

Insert Media (and other) doesn't work

3 (talkcontribs)

I installed mediawiki 1.30 with visuael editor. The editor starts, edit works: I can add text.

But when I choose "Insert -> Media" nothing happens. The same when I click on the "link" Button or when I choose "bold" for a selected text - there is just no reaction.

Can anyone give me a hint on how to fix this problem?

Whatamidoing (WMF) (talkcontribs)
2003:C0:BBD9:CB00:FE70:9E8:9183:F663 (talkcontribs)

Thank you. I try it there.

Reply to "Insert Media (and other) doesn't work"

Force Line Breaks in VE

Summary by Whatamidoing (WMF)
Konjurer (talkcontribs)

Is there a way to force line breaks in the VE? The editor does not place any space after a bulleted list and it does not look very good.

ESanders (WMF) (talkcontribs)

No, empty linebreaks will be removed by Parsoid no matter where they are in the document. Line spacing should be the responsibility of the skin's CSS, not the user.

Reply to "Force Line Breaks in VE"

VisualEditor Error: Could not connect to the server

2 (talkcontribs)

I've just installed MediaWiki 1.30 on Ubuntu 16.04 32-bit, and I've successfully installed Parsoid and RESTbase. The 8000 port for Parsoid and 7231 port for RESTbase are all accessible and can return the correct pages. But when I try to edit or create pages using Visual Editor, the message shows up: Error loading data from server: Could not connect to the server. I've read through the docs in MediaWiki and googled my problem, but it seems that no one has met this problem before.

Do anyone know how to solve this problem? Thanks for your help.

ESanders (WMF) (talkcontribs)

You need to make sure the VE can talk to RESTbase by setting $wgVirtualRestConfig['modules']['parsoid'] in LocalSettings.php (see here), and also that RESTbase can talk to Parsoid using config.yaml (although it sounds like that is working if you can access pages on port 7231).

Reply to "VisualEditor Error: Could not connect to the server"