Page MenuHomePhabricator

VisualEditor: Provide a "view VE" mode / disable editing for protected pages
Closed, ResolvedPublic

Description

There should be a view-source equivalent for the visual editor so that people can see the page in VE as if the could edit it. It should allow them to interrogate things like template, so they can find out which template is producing what they see and how it does that. When VE can cope with copy+paste, then this will also allow them to copy and paste the relevant image/template/whatever to whatever article they are working on.

See Also:

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:09 AM
bzimport set Reference to bz51547.

(In reply to comment #0)

There should be a view-source equivalent for the visual editor so that people
can see the page in VE as if the could edit it.

This could get quite complex, but do-able if it's worth it.

It should allow them to interrogate things like template, so they can find out
which template is producing what they see and how it does that.

I can sort-of see the value here, but it's not great.

When VE can cope with copy+paste, then this will also allow them to copy and
paste the relevant image/template/whatever to whatever article they are working
on.

We're probably going to want to do this with "read mode" HTML rather than build something like that (so, you copy something from the action=read and paste into veaction=edit and you get the template/etc. magically working).

Marking as "low" priority given difficulty and relatively low value for users; happy to be convinced otherwise.

Esanders renamed this task from VisualEditor: Provide a "view VE" mode for protected pages to VisualEditor: Provide a "view VE" mode / disable editing for protected pages.Oct 6 2016, 3:43 PM

The ability to load VE at all on protected pages was removed in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/VisualEditor/+/350471/. As a result you can only open the wikitext view source page.

Ideally you would be able to open VE in read-only mode as this bug describes.

Change 489416 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Load VE in read-only mode on protected pages

https://gerrit.wikimedia.org/r/489416

Esanders updated the task description. (Show Details)
Esanders removed the point value for this task.
Esanders moved this task from Incoming to Code review on the VisualEditor (Current work) board.

Change 489416 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Load VE in read-only mode on protected pages

https://gerrit.wikimedia.org/r/489416

Read-only VE is now available, but rather sneaky. You can only access it by switching from old wikitext editor:

image.png (980×1 px, 160 KB)

I think we should consider some more obvious ways to access it. Should we have another tab for it, called "View in editor" or something?

Additionally, if the user has NWE enabled, the old wikitext editor is still used for protected pages (but NWE loads after switching to visual and back).


After we settle on this, we should probably brag about this in Tech News (User-notice). Something like "You can now open the visual editor in read-only mode on protected pages to see how they are made or copy citations to other pages".

You can only access it by switching from old wikitext editor

Or by using veaction=edit.

Additionally, if the user has NWE enabled, the old wikitext editor is still used for protected pages (but NWE loads after switching to visual and back).

And if the user doesn't have NWE enabled, switching back to wikitext gives an error: "Error loading data from server: readonly."

Additionally, if the user has NWE enabled, the old wikitext editor is still used for protected pages (but NWE loads after switching to visual and back).

And if the user doesn't have NWE enabled, switching back to wikitext gives an error: "Error loading data from server: readonly."

This doesn't happen for me locally, only on Beta, which has been stuck in readonly mode for two weeks now.

Additionally, if the user has NWE enabled, the old wikitext editor is still used for protected pages (but NWE loads after switching to visual and back).

And if the user doesn't have NWE enabled, switching back to wikitext gives an error: "Error loading data from server: readonly."

This doesn't happen for me locally, only on Beta, which has been stuck in readonly mode for two weeks now.

My comment was wrong anyway, as I actually did have NWE enabled. But whatever, switching now works on Beta as expected, both with NWE and without.