Page MenuHomePhabricator

Copy-paste short-circuits wikitext detection mechanism
Open, LowPublic8 Estimated Story Points

Description

It used to be that when you typed [[ in VisualEditor, it showed the "wikitext detected" message. Now, it opens the link dialog directly (which is even better); the warning is still shown when you type things like ~~~~.

However, when you copy-paste text that contains [[ or ~~~~, nothing happens, which can lead to user error.

I'm not sure if it's possible (or desirable) to open the link dialog since there might be several wikilinks in the pasted text. Another possibility would be to convert wikilinks automatically. In any case, in the meantime, we should at least display the "wikitext detected" message to warn the user about their mistake.

Event Timeline

gpaumier raised the priority of this task from to Needs Triage.
gpaumier updated the task description. (Show Details)
gpaumier added a subscriber: gpaumier.
Jdforrester-WMF set Security to None.

T109449: Convert pasted fragments of basic wikitext into rich content has fixed the [[ case. The ~~~~ case could be added to the "potentially wikitext" matching heuristic, but I'd be nervous doing so -- it seems a little too general.

I suggest this bug be closed, and separate new tasks be opened focusing on the desired behavior for (a) typing ~~~~, and (b) pasting text including ~~~~, since the two cases would be handled differently when implementing, and it's not clear they should behave identically.