Topic on Talk:VisualEditor

Disable VE for specified pages/categories?

7
Jamesmontalvo3 (talkcontribs)

Is there a way to specify that a page or category does NOT use VE? We have certain pages that are handled by Semantic Forms or are for other reasons not very VE-compatible, and we'd like to remove VE as an option for them.

Whatamidoing (WMF) (talkcontribs)

I've wished for this myself, but VisualEditor cannot be disabled for (or enabled on) specific pages. It can only be configured per namespace.

Jamesmontalvo3 (talkcontribs)

The VE edit link can be removed pretty easily with javascript by doing:

$("#ca-ve-edit").hide();

This is of course not ideal, but we may end up creating a small extension to allow certain categories, or pages with a particular magic word, not show the VE edit button.

Whatamidoing (WMF) (talkcontribs)

But wouldn't that Javascript remove VisualEditor from all pages, rather than just the one? And if that's your goal, then why not just go to Special:Preferences and turn it off?

Alex Monk (WMF) (talkcontribs)

That won't prevent veaction=edit from working.

Jamesmontalvo3 (talkcontribs)

@Krenair (WMF) Correct, that will not prevent VE from working. My need for this is simply not to put an "edit" link on a page where VE wouldn't be the optimal editor.

@Whatamidoing (WMF) Yes, just that line would remove VE from all pages. Sorry, my intent was unclear. With additional logic you could do that just for pages you don't want VE (check for categories, check for magic words, etc).

Whatamidoing (WMF) (talkcontribs)

Since you're talking about a private wiki, could you move the pages that VisualEditor doesn't handle well into a different namespace?

Reply to "Disable VE for specified pages/categories?"