WTE section=new mode allows switching to VE, but VE doesn't support this mode. Any text you input before trying to switch is lost. This affects both the old and new wikitext editors.
Description
Details
Related Objects
Event Timeline
(To reproduce this, you have to have a page that allows both VE and section=new. You can achieve this by enabling VE on talk pages, or adding __NEWSECTIONLINK__ to a main namespace page.)
Disable the switch to VE tool when section === 'new'? (Note also you can probably switch via edit tabs/shortcuts)
Yeah, or have some popup error message, or whatever. It's a rare case.
(We could also add support for it… but getting the right behavior for the heading and edit summary may be tricky.)
Yeah, I suppose we could look into adding that. We already support editing sections in VE (it's only enabled on mobile on Wikimedia sites), so it should be possible. But it might not be easy, since adding a section to the Parsoid HTML markup would require VE to deal with its section markup, rather than just ignore it like we do now.
(Also, switching in the opposite direction, from VE new-section-mode to WTE new-section-mode, would also require some changes to the switching code. Right now switching from VE section-edit-mode to WTE always switches to full-page-mode, because e.g. editing references may cause changes outside of the section. This would be a very poor behavior for adding new sections. But when adding a new section that shouldn't be a problem, since there are no existing references to edit, so we should be able to make it switch to WTE new-section-mode.)
Change #1110895 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Error out when trying to load new section editing in visual mode
Change #1110897 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Disable switching to visual mode when adding new section
Change #1110895 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Error out when trying to load new section editing in visual mode
Change #1110897 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Disable switching to visual mode when adding new section