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

Add "disableUploads"/"embeddedOnly" option on Media blocks? #1230

Open
bleafman opened this issue Nov 8, 2024 · 0 comments
Open

Add "disableUploads"/"embeddedOnly" option on Media blocks? #1230

bleafman opened this issue Nov 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bleafman
Copy link

bleafman commented Nov 8, 2024

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

Hi BlockNote folks! We would like to be able to support Image uploads but only allow embeds for other media formats (video, audio, etc.).

Describe the solution you'd like

I'd like for Media blocks to accept some sort of configuration option (ex. embedOnly) that will not show the Upload option.

Screenshot 2024-11-08 at 3 08 28 PM

The "Upload" option is currently all or nothing for all Media blocks if you provide an uploadFile function in the FilePanel.

Describe alternatives you've considered

I can build my own custom blocks but because the control for FilePanel is so deep I'm copying a LOT of code to keep the same UX for all Media blocks.

Additional context

Happy to put up a PR, just wanted to check to make sure it wouldn't violate any design decisions with the component APIs to add more configuration.

Bonus
[ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖

@bleafman bleafman added the enhancement New feature or request label Nov 8, 2024
@bleafman bleafman changed the title Add "disableUploads"/"embeddedOnly" option on Media blocks Add "disableUploads"/"embeddedOnly" option on Media blocks? Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant