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

Media Upload to custom URL / backend #233

Closed mzwach closed 1 year ago

mzwach commented 1 year ago

I am struggeling to get a custom backend to receive inserted images, using an isolated block editor instance I cannot find any documentation about the custom media upload interface, nor any example.

Hopefully anyone can provide such an example, since without user defined upload / backend the isolated editor would not make any sense in my opinion.

` const settings = { }; settings.editor = {}; settings.editor.mediaUpload = myupload; wp.attachEditor( textarea, settings );

const myupload = function(x) { //is this the right place to deal with an upload??? }

`

johngodley commented 1 year ago

The readme contains an example:

https://github.com/Automattic/isolated-block-editor#media-uploader

For anything more custom you will need to look at Gutenberg itself.