- Issue created by @loze
- Status changed to Postponed: needs info
7 months ago 11:40pm 3 December 2023 - π΅πΉPortugal marcofernandes
Can you provide more details about your installation? Drupal version, Gutenberg version, any other modules installed, what frontend theme you're using?
- π¬π§United Kingdom Juc1
I have the same problem in Drupal 10.1.6 / gutenberg 3.0.0-beta1 - youtube / soundcloud iframes render ok in /node/65 but in /node/65/edit they have height 0 and are therefore invisible in the gutenberg editor =
- πΊπΈUnited States loze
Yes, Im seeing exactly what Juc1 is describing. This happens regardless of which admin or frontend theme I am using.
- π΅πΉPortugal marcofernandes
Some findings:
- This happens when Media module is enabled. Embeds are processed differently on the editor when Media is enabled, it uses Media embed processor. Btw, when not enabled, it uses Iframe.ly service which, probably, we need to stop using. Related to π¬ Iframe.ly Active
- Actually I never used the
allowResponsive
orenableResponsiveEmbeds
settings but I don't think it will do any difference when using Media. - I've checked some of our projects and I noticed that frontend devs are adding this style to wp-block-embed (SCSS):
figure.wp-embed-aspect-16-9 { aspect-ratio: 16 / 9; .wp-block-embed__wrapper { &, iframe { height: 100%; width: 100%; } } }
It seems to do the trick.
- Status changed to Needs work
7 months ago 1:49pm 9 December 2023 - π΅πΉPortugal marcofernandes
btw, you can add the above css to *.gutenberg.yml file like this:
theme-support: styles: - css: |- figure.wp-embed-aspect-16-9 { aspect-ratio: 16 / 9; } figure.wp-embed-aspect-16-9 .wp-block-embed__wrapper { height: 100%; width: 100%; } figure.wp-embed-aspect-16-9 .wp-block-embed__wrapper iframe { height: 100%; width: 100%; }
If want want to use libraries:
libraries-edit: - your-theme/your-lib