High-priority upcast converter that creates imageInline for any
<img data-xlink-href="..."> when the current insertion position allows
inline content (e.g. inside a paragraph).
Without this, ImageBlockEditing's normal-priority converter runs first
and calls safeInsert for an imageBlock. When the drop cursor is inside
a paragraph (between letters), safeInsert splits that paragraph to
accommodate the block element, leaving empty paragraph fragments behind.
By creating imageInline at high priority for inline positions, no
paragraph splitting occurs. When the cursor is at a block-level position
(between paragraphs) imageInline is not allowed there; the converter
returns without consuming so that ImageBlockEditing can place an
imageBlock at block level. The imageBlock post-fixer then converts
that back to paragraph + imageInline without any splitting.
High-priority upcast converter that creates
imageInlinefor any<img data-xlink-href="...">when the current insertion position allows inline content (e.g. inside a paragraph).Without this,
ImageBlockEditing'snormal-priority converter runs first and callssafeInsertfor animageBlock. When the drop cursor is inside a paragraph (between letters),safeInsertsplits that paragraph to accommodate the block element, leaving empty paragraph fragments behind.By creating
imageInlineat high priority for inline positions, no paragraph splitting occurs. When the cursor is at a block-level position (between paragraphs)imageInlineis not allowed there; the converter returns without consuming so thatImageBlockEditingcan place animageBlockat block level. TheimageBlockpost-fixer then converts that back toparagraph + imageInlinewithout any splitting.