Automattic / isolated-block-editor

Repackages Gutenberg's editor playground as a full-featured multi-instance editor that does not require WordPress.
343 stars 50 forks source link

Remove the media upload override #194

Closed johngodley closed 1 year ago

johngodley commented 1 year ago

The isolated editor automatically sets the editor.MediaUpload filter to use the Gutenberg media library. This shouldn't happen, and it should be left to the user to set this up for themselves. This allows a user to then use another library, or even disable it entirely.

This PR removes the automatic filter. It is a breaking change for anyone using this who relied on the media library, and the documentation has been updated.

For future reference:

import { MediaUpload } from '@wordpress/media-utils';

addFilter( 'editor.MediaUpload', 'your-namespace/media-upload', () => MediaUpload );