CoreMedia CKEditor 5 Plugins
    Preparing search index...

    Function upcastContentImageAsInline

    • 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.

      Returns (dispatcher: UpcastDispatcher) => void