fxmontigny / quill-image-upload

A module for Quill rich text editor to upload images to be selected from toolbar editor.
107 stars 43 forks source link

Example of callbackOK? #15

Closed ryancornia closed 5 years ago

ryancornia commented 5 years ago

I am posting to a server, but am unsure what the server should return and how to bind it to Quill to show the image uploaded.

I assume a json string like:

{ "url": "Http://...."}

but are there any examples of binding that URL so it display in the editor in the callbackOK method?

ryancornia commented 5 years ago

Figured out an example:

serverResponse is json: { "url": "http://myimage..."}

callbackOK: (serverResponse, next) => {
                        next(serverResponse.url);
                    },