vue-editor-js icon indicating copy to clipboard operation
vue-editor-js copied to clipboard

image upload end point is not working | editor is not taking config info

Open hkmsadek opened this issue 4 years ago • 2 comments

I am trying to upload an image. I have config set up like this just for test

               config: {
				image: {
				// Like in https://github.com/editor-js/image#config-params
				endpoints: {
					byFile: 'http://localhost:8090/image',
					byUrl: 'http://localhost:8090/image-by-url',
				},
				field: 'image',
				types: 'image/*',
				},
			},```

and 

<editor ref="editor" autofocus holder-id="codex-editor" save-button-id="save-button" :init-data="initData" @save="onSave" :config="config"

                        />

but it's not taking the config options and instead it send data to the current page url with a post request. Any idea why?

hkmsadek avatar May 31 '20 14:05 hkmsadek

you have to change your endpoints in byFileand byUrl to a working backend endpoint for uploading images

thebilljustin avatar Feb 12 '21 07:02 thebilljustin

hi im a bit late but if somebody got the same issue i have a fix, the problem is that inside tools you have to specify image property and inside of it you have to specify again config specific to that tool.

import image after installing it at the top of the script import Image from "@editorjs/image";

config2

calrloco avatar Feb 16 '21 17:02 calrloco