Markers directly in document fragment are always downcast to element #9463
Labels
package:engine
resolution:expired
This issue was closed due to lack of feedback.
status:stale
type:improvement
This issue reports a possible enhancement of an existing feature.
📝 Provide a description of the improvement
This is a follow-up to #9460.
After markers downcast is enabled in a document fragment, there is one problem with it. When using
markerToData
, the marker is always downcast to element, instead of an attribute. This is because everything (including text) is enabled inside a document fragment.markerToData
relies on schema check and whether$text
is allowed at given position to decide whether element or attribute should used.As a result, we get following conversion:
Instead of:
Which is different if the same content would be inside a
$root
. OTOH, we need to have text allowed inside a document fragment. This makes the change difficult, we need to decide if we want to change the logic behind placing attributes instead of elements for markers.The text was updated successfully, but these errors were encountered: