0

I am trying to insert an custom element inside a figcaption tag. But image is not set properly. I customized image upload plugin of ckeditor 5.

I changed the plugin. When I upload image, this code lines are running:

const newCaptionElement = savedCaption || writer.createElement( 'caption' );
const creditlineElement = savedCaption || writer.createElement( 'creditline' );

    writer.append( newCaptionElement, selectedImage );
    writer.append( creditlineElement , newCaptionElement );

It's added image in dom tree like this:

My code want to look like this structure in dom tree:

0 Answers0