Page MenuHomePhabricator

Visual Editor messes up paragraphs when switching between source and visual
Closed, DeclinedPublic

Description

When editing text in source mode and then switching to visual, VE messes up newlines by replacing Wikitext paragraph breaks (double newline \n\n, which separates paragraphs) with double ↵ character which does not separate paragraphs. This of course breaks all formatting since paragraphs are gone and replaced with one huge paragraph peppered with ↵↵. Moreover, somehow when saving it, HTML is also displayed without paragraphs, even though source looks exactly the same.

It is a bit hard to reproduce on isolated example but happens to me a lot when I edit pages combining VE and source editing and copy stuff from external sources.

Seems a bit similar to T50290 but different since it's double newline and VE messes up correctly formatted text.

Event Timeline

Deskana changed the task status from Open to Stalled.Jul 31 2018, 6:56 PM
Deskana triaged this task as Medium priority.
Deskana added a subscriber: Deskana.

I can't reproduce this problem. I made a page with this source text in the 2010 wikitext editor:

Hello. This is some text.

With a paragraph break above it.

and then I changed to the visual editor, and saved. It looked exactly as I expected afterwards, with a paragraph break between the two paragraphs, and it also looked fine in preview for source mode as well.

Is there something I'm missing?

It doesn't happen every time, unfortunately. I am not sure yet what is the trigger, but it happens to me a lot when I am editing. I'll try to narrow it down and see what exactly triggers it. One possible thing is copy-paste from outside, but I'm not 100% sure on that.

I'll try to narrow it down and see what exactly triggers it. One possible thing is copy-paste from outside, but I'm not 100% sure on that.

Unfortunately closing this Phabricator task as no further information has been provided. @Smalyshev: If you manage to narrow it down and if this still happens, please set the status of this task back to "Open" via the Add Action...Change Status dropdown. Thanks!