You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading/converting to CKEditor, the markup for existing images with captions changes and the figure and figcaption elements get deleted.
Not sure if this is something I need to fix in HtmlPurifier, but I can embed new images in CKEditor which uses figure elements and these do persist.
Steps to reproduce
In a Redactor RTE field, have an existing figure element with image and caption:
<figure><img src="/uploads/shared/1200x630.png?v=1625830523#asset:74:url" alt="OG image" data-image="4ogpunopbfm4"><figcaption>Caption for this image</figcaption></figure>
Run ./craft ckeditor/convert, open the new CKEditor field
View source and observe the content is now:
<p>
<img src="/uploads/shared/1200x630.png?v=1625830523#asset:74:url" alt="OG image">Caption for this image
</p>
Hi, thanks for reaching out. The good news is the ckeditor/convert command doesn’t actually touch your data, so unless you re-save the element with the converted field, the data stored in the database won’t change.
CKeditor uses <figure> for various items, not just images, and it looks like it relies on the <figure> tag to have a class of image in order to interpret it the way Redactor did.
I’ll update again once I have a solution in place.
Description
When upgrading/converting to CKEditor, the markup for existing images with captions changes and the figure and figcaption elements get deleted.
Not sure if this is something I need to fix in HtmlPurifier, but I can embed new images in CKEditor which uses figure elements and these do persist.
Steps to reproduce
./craft ckeditor/convert
, open the new CKEditor fieldAdditional info
The text was updated successfully, but these errors were encountered: