Skip to content

fix(pat-tinymce): Add a fallback for Plone 5 images without data-pict… - #1493

Closed
thet wants to merge 1 commit into
masterfrom
tinymce-scale-fallback
Closed

fix(pat-tinymce): Add a fallback for Plone 5 images without data-pict…#1493
thet wants to merge 1 commit into
masterfrom
tinymce-scale-fallback

Conversation

@thet

@thet thet commented Aug 18, 2025

Copy link
Copy Markdown
Member

…urevariant attributes.

Responsive picture variants were introduced in Plone 6. Content from Plone 5 where no data-picturevariant was available lost had no scale selected in the image dialog.
This PR fixes that by falling back to the data-scale attribute. This allows old images in the TinyMCE‌ image edit dialog to have their scale preselected. The precondition for this is that the old scales are configured as picture variants.

image

I tried my best to test this feature but had to give up.
TinyMCE is untestable.

@thet
thet requested review from 1letter, MrTango and petschki August 18, 2025 16:54
…urevariant attributes.

Responsive picture variants were introduced in Plone 6. Content from
Plone 5 where no `data-picturevariant` was available lost had no scale
selected in the image dialog.
This PR fixes that by falling back to the `data-scale` attribute.
This allows old images in the TinyMCE‌ image edit dialog to have their
scale preselected. The precondition for this is that the old scales are
configured as picture variants.
@thet

thet commented Sep 19, 2025

Copy link
Copy Markdown
Member Author

I used an upgrade step using collective.exportimport.fix_html

@thet
thet deleted the tinymce-scale-fallback branch January 13, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant