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

External Media: Allow the MediaUpload component to render a custom button #19742

Closed
Tug opened this issue May 5, 2021 · 0 comments
Closed

External Media: Allow the MediaUpload component to render a custom button #19742

Tug opened this issue May 5, 2021 · 0 comments
Labels
[Block] Story [Extension] External Media Extend all block editor media tools to support external providers [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Feature Request

Comments

@Tug
Copy link
Contributor

Tug commented May 5, 2021

Is your feature request related to a problem? Please describe.

Yes, in #19628 we enabled external media sources for the story block and noticed the pencil icon in the block toolbar used to edit the story was being replaced with a button with the text Select Media:

image

Describe the solution you'd like

We'd like to implement a way for blocks to define the button they'd like to use even when there are mutile media sources available. Just like it's already the case for blocks that rely on galleries, we need it for blocks that accept different types of media such as the story block.

The solution could be to reuse the render function and pass it a custom "open" function to detect a click and render the dropdown menu

Describe alternatives you've considered

No real alternatives beside ignoring this issue.

@Tug Tug added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Feature Request [Extension] External Media Extend all block editor media tools to support external providers [Block] Story labels May 5, 2021
@Tug Tug closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Story [Extension] External Media Extend all block editor media tools to support external providers [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant