Creates a view element representing the image of provided image type.
An 'imageBlock' type (block image):
An 'imageInline' type (inline image):
srcattributes are converted separately, so they are not included.
writer : DowncastWriter
imageType : 'imageBlock' | 'imageInline'
The type of created image.
determineImageTypeForInsertionAtSelection( schema, selection ) → 'imageBlock' | 'imageInline'
Considering the current model selection, it returns the name of the model image element (
'imageInline') that will make most sense from the UX perspective if a new image was inserted (also: uploaded, dropped, pasted) at that selection.
The assumption is that inserting images into empty blocks or on other block widgets should produce block images. Inline images should be inserted in other cases, e.g. in paragraphs that already contain some text.
'imageBlock' | 'imageInline'