Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow embed block utils functions to be used by an other block / project #26102

Open
cpapazoglou opened this issue Oct 14, 2020 · 0 comments
Open
Labels
[Block] Embed Affects the Embed Block [Type] Enhancement A suggestion for improvement.

Comments

@cpapazoglou
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In an effort to create a new video embed block I reused the following code (copy - paste)
https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/embed/util.js#L151-L211
https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/embed/constants.js

Actually I needed to apply the correct aspect ratio class so my iframe didn't stretch

It would be nice if I could import the utils functions as dependencies.

Describe the solution you'd like
We can export some or all utils functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants