https://bugzilla.wikimedia.org/show_bug.cgi?id=55746
Web browser: ---
Bug ID: 55746
Summary: Multiline list items rendering differently in
ContentEditable than the resulting wikitext
Product: VisualEditor
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: ContentEditable
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
This is an interesting issue that, as far as I understand, can be either (or
both) VE and Parsoid, and seems to be limited by wikitext.
I'm not entirely sure what the strategy here should be -- If the final article
markup is "the way things are supposed to be" then the fix should be to correct
the way things look to the user in ContentEditable so they match the final
article display.
However, there might be a creative way to manipulate the wikitext in Parsoid
(or the html VE sends to Parsoid) so that the end result fits what VisualEditor
presents.
The first solution will disallow multiline list items. The second solution
would run the risk of having html tags in wikitext, or worse, having the
dreaded dirty diffs if the desired multiline list item is more complex.
Here's how to see the issue:
(Refer to this image:
http://mg.viewskew.com/mgoblin_media/media_entries/432/ve_listbug.png )
1. Edit some wiki page (can be empty/new)
2. Type 3-4 lines
3. Mark the lines and make them a list with the list button
4. Go to the second element (or whatever one that is in the middle of the list)
5. Go to the end of that listItem's line, and hit "Shift-Enter"
6. In VisualEditor, the behavior is similar to other word processors with
multiline list element -- you get a second line that is indented the same as
the list item you're under.
7. Type something so you have text on that multiline segment. (#1 in the image)
8. Click 'save' and review changes; wikitext is not representing what we see on
the screen (see #2 in the image)
9. Save the article -- the article presents a different format than what VE
showed (#3 in the image) and presents a different content to edit if we want to
edit that article again (#4 in the image)
The way I see it (and I may well be wrong, as I'm not that familiar with
wikitext) -- we can either fix this bug so VE presents the same display as the
final article (as in, disallow shift-enter in lists) or we need to split
multiline items into paragraphs that can render as such into wikitext (not sure
if that's possible) -- the other alternative is to force a <br /> on multiline
lists, which would make the wikitext into something like
* item 1
* item 2
* item 3<br />and its multiline
* item 4
And that works perfectly in the article and in edit mode -- but it can be
limited in what can be done inside a multiline list item, and requires the use
of <br /> tag inside the wikitext.
Also, there may be more cases of complex list items with VE's expanding
features. For instance, there can be cases where a multiline list item should
contain a certain language block, or a short code highlight segment, or a
<math> block. Right now they render proplery in CE if added as multiline list
item, but break the list and become separate paragraph items on save.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l