vue-editor-js
vue-editor-js copied to clipboard
image upload end point is not working | editor is not taking config info
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?
you have to change your endpoints in byFile
and byUrl
to a working backend endpoint for uploading images
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";