ChangJoo-Park / vue-editor-js

editor.js for Vue users
https://codesandbox.io/embed/o7lyqwmvmq
MIT License
358 stars 76 forks source link

Change the image upload URL #30

Closed ckissi closed 4 years ago

ckissi commented 4 years ago

I was searching through issues here, unfortunately, none of the related answers actually answers this. The code below doesn't work. Any suggestion?

data() {
        return {
            initData: {},
            editorData: {},
            tools: {
                image: {
                    config: {
                        endpoints: {
                            byFile: "http://localhost:8008/uploadFile",
                            byUrl: "http://localhost:8008/uploadFile"
                        }
                    }
                }
            },
...
ChangJoo-Park commented 4 years ago

Thanks for issue @ckissi , Did you use above version 1?

ckissi commented 4 years ago

Thank for the answer @ChangJoo-Park. I use version: "vue-editor-js": "^1.0.1" .

Also have this in my main.js :

import Editor from "vue-editor-js";
Vue.use(Editor);
rajesh-h commented 4 years ago

Hi @ckissi this is slightly offtopic.

Could you please let me know what this end point does?

http://localhost:8008/uploadFile

I am looking for some sample codes to upload files to my firestore hosting. I did not get even a single example. Even if your link does not meant to work on firestore it's fine, i am looking for an crud example how things really work at the backend.

Thank you very much for your help.

ckissi commented 4 years ago

@rajesh-h My problem is that this endpoint is not called. This should handle image upload itself. I actually do not have implemented it yet but the issue is as I said that in XHR tab in inspector I see no call to it. So the config is probably not well implemented.

rajesh-h commented 4 years ago

Not a problem. Thank you for your comment. I will keep my hunt on. After struggling with many WYSIWYG editors started looking at editor.js , but still struggling to implement on my nuxt project. Let's hope i get a working example from somewhere

ckissi commented 4 years ago

@rajesh-h are you looking for nodejs example to upload images? What backend do you use?

rajesh-h commented 4 years ago

@ckissi currently I am busy building a blog for my friend. Basically it will be a recipe blog. I am still a starter though.

I have decided to go with nuxt for front end and Google firebase for backend. I am currently first looking to build the admin site where he can upload recipes. One of the main component to add / edit is Wysiwyg editor. Tried many plugins everywhere I failed with image upload portion.

Image will be uploaded to Google firebase hosting.

Once admin portion is complete I will work on front end portion which will be exposed to normal readers.

Current website is built on wordpress and is very slow and heavy so planning to go with nuxt.

Thanks, Rajesh

ChangJoo-Park commented 4 years ago

Please see https://github.com/ChangJoo-Park/vue-editor-js#upload-image @ckissi

rajesh-h commented 4 years ago

Thank you very much @ChangJoo-Park I will work based on the example provided.