Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missed "upload-image" icon #486

Merged
merged 1 commit into from
Jul 27, 2022
Merged

Add missed "upload-image" icon #486

merged 1 commit into from
Jul 27, 2022

Conversation

hlf20010508
Copy link
Contributor

Once I set uploadImage: true, the browse-file window didn't raise, which confused me for a long time.
After I check the source code, I found there are two button for image.

  • image
  • upload-image

The default one is image.
I thinks upload-image should be written in doc, cause not everyone likes to check source code.

By the way, I think the examples you provided are not adequate, especially for those custom functions like imageUploadFunction. You should write some simple examples for them, not just provide a big project to let others understand.

imageUploadFunction: (file, onSuccess, onError) => {
                let form = new FormData
                form.append('file', file)
                axios({
                    method: 'post',
                    url: '/admin/upload',
                    data: form,
                }).then((res)=>{
                    if(res.data.success){
                        onSuccess(res.data.url)
                    }
                    else{
                        onError(res.data.error)
                    }
                })
            },

This is my example.
To figure it out, I searched issues, and found #376 which mentioned a project, and searched a lot to understand it.

But no one need to understand big project. A simple example is concise and easy to understand.
Maybe I'm a noob. But there are a lot of noobs.

But still, thanks for your project. I really enjoy it in my blog.

@Ionaru Ionaru merged commit b347a91 into Ionaru:master Jul 27, 2022
@Ionaru
Copy link
Owner

Ionaru commented Jul 27, 2022

Thank you for the fix in the README.

The editor is long due for a big update/rewrite (#447), part of my plan for it is to provide guides and examples kinda like CodeMirror has them. But for this older version of the editor I do not think it is still worth the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants