CKEditor 5 Mention plugin - append child to attribute element

Viewed 283

https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html

I'd like to insert <img inside 'a' element in downcast. It can be 'a', 'span' whatever. The problem is that this is AttributeElement and I can't create img and insert it like

writer.insert(writer.createPositionAt(myAttributeElement, 0), myImage) because I get an error view-writer-invalid-position-container. I know that it would work if downcast was elementToElement with 'createContainerElement' instead of 'createAttributeElement' but the Mention plugin expects to have downcasting written as it is. Can I in someway append actually any other element inside AttributeElement?

0 Answers
Related