VE drops things like <i></i>, which Parsoid sometimes uses to preserve strange things.
I think a solution might be to store this as an inline node or as a meta item.
Version: unspecified
Severity: normal
VE drops things like <i></i>, which Parsoid sometimes uses to preserve strange things.
I think a solution might be to store this as an inline node or as a meta item.
Version: unspecified
Severity: normal
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | Jdforrester-WMF | T50426 VisualEditor: Pre-beta needs (tracker) | |||
Resolved | Esanders | T50605 VisualEditor: Empty annotations are dropped |
Should the inline node disappear if saved next to similarly annotated text,
e.g.
'<i><emptyAnnotation /></i><i>Foo</i>' => '<i>Foo</i>'
or more complex:
'<i><emptyAnnotation /></i><b><i>Foo</i></b>' => '<i><emptyAnnotation /><b>Foo</b></i>'
?
(In reply to comment #1)
Should the inline node disappear if saved next to similarly annotated text,
e.g.
'<i><emptyAnnotation /></i><i>Foo</i>' => '<i>Foo</i>'or more complex:
'<i><emptyAnnotation /></i><b><i>Foo</i></b>' => '<i><emptyAnnotation
/><b>Foo</b></i>'
?
I believe the latter, but Roan was going to answer this.
Related URL: https://gerrit.wikimedia.org/r/68213 (Gerrit Change I0f3a194f629b054f193a61af105733a555775d79)
Above change fixes issue with annotations being dropped, but we still need to fix empty annotations not rendering (e.g. <span style="display: block; background: red; width: 100px; height: 100px;"></span>), either here or in a new bug.
This works for single annotations, but not for nested ones. See https://gerrit.wikimedia.org/r/#/c/69343/ for a failing test case.