A plug-n-play uploader for uploading images to imgur directly.
npm install ckeditor5-imgur-uploader
Please follow the instructions to create a new Imgur application (where it says callback just use a dummy one) so that you can generate a clientID.
import ImgurUploaderInit from 'ckeditor5-imgur-uploader'
const ImgurUploader = ImgurUploaderInit({clientID: 'INSERT_IMGUR_CLIENT_ID'})
ClassicEditor.create(document.querySelector('#editor'), {
extraPlugins: [ImgurUploader]
// ...
}).catch(error => {
console.log(error)
})
import React from 'react'
import ImgurUploaderInit from 'ckeditor5-imgur-uploader'
import CKEditor from '@ckeditor/ckeditor5-react'
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
function CkeditorWrapper() {
const ImgurUploader = ImgurUploaderInit({clientID: 'INSERT_IMGUR_CLIENT_ID'})
return (
<CKEditor
config={{
extraPlugins: [ImgurUploader]
}}
editor={ClassicEditor}
/>
)
}
Pull requests are welcome, so feel free to contribute!