https://github.com/pitops/ckeditor5-imgur-uploader
Ckeditor5 custom uploader for imgur -with or without using a framework
https://github.com/pitops/ckeditor5-imgur-uploader
ckeditor5 ckeditor5-plugin imgur-uploader
Last synced: 11 months ago
JSON representation
Ckeditor5 custom uploader for imgur -with or without using a framework
- Host: GitHub
- URL: https://github.com/pitops/ckeditor5-imgur-uploader
- Owner: pitops
- Created: 2019-04-09T11:56:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-09T13:17:51.000Z (about 7 years ago)
- Last Synced: 2024-08-10T09:59:59.912Z (almost 2 years ago)
- Topics: ckeditor5, ckeditor5-plugin, imgur-uploader
- Language: JavaScript
- Size: 2.93 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CKeditor5 Imgur Uploader
A plug-n-play uploader for uploading images to [imgur](https://imgur.com/) directly.
## Instructions
```bash
npm install ckeditor5-imgur-uploader
```
## Generate Imgur CLIENT ID
Please follow [the instructions](https://api.imgur.com/oauth2/addclient) to create a new Imgur application (where it says callback just use a dummy one) so that you can generate a clientID.
## Examples
### With no framework
```javascript
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)
})
```
### React
```javascript
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 (
)
}
```
## Contributions
Pull requests are welcome, so feel free to contribute!