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

Expose embed block creation function #13490

Open
ChaosExAnima opened this issue Jan 24, 2019 · 2 comments
Open

Expose embed block creation function #13490

ChaosExAnima opened this issue Jan 24, 2019 · 2 comments
Assignees
Labels
[Block] Embed Affects the Embed Block [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Enhancement A suggestion for improvement.

Comments

@ChaosExAnima
Copy link

Is your feature request related to a problem? Please describe.
I would like a way to register new embed blocks simply via a public API. Currently, the only way to create a new embed seems to be replicating all related core code.

Describe the solution you'd like
I would like to see the function getEmbedBlockSettings exported to a public API.

Describe alternatives you've considered
As mentioned, so far the alternatives would be to replicate all functionality in getEmbedBlockSettings and getEmbedEditComponent, along with all dependencies. This would be very inefficient and not inherit any Core improvements automatically, requiring maintenance.

@swissspidy swissspidy added Needs Technical Feedback Needs testing from a developer perspective. [Block] Embed Affects the Embed Block labels Jan 24, 2019
@youknowriad
Copy link
Contributor

Seems fine to expose. Since it's possible to add a custom oembed provider, it should be possible to add a corresponding block quickly.

@youknowriad youknowriad added [Type] Enhancement A suggestion for improvement. [Feature] Extensibility The ability to extend blocks or the editing experience and removed Needs Technical Feedback Needs testing from a developer perspective. labels Jan 25, 2019
@LittleCoding
Copy link

Along with this exposing of create embed, it would be great to be able to call the embeds that use this method of creation as a React component. So an embed can be used as a editable field/area of custom blocks like MediaUpload.

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 [Feature] Extensibility The ability to extend blocks or the editing experience [Type] Enhancement A suggestion for improvement.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

6 participants