Skip to content

Ckeditor5 custom uploader for imgur -with or without using a framework

Notifications You must be signed in to change notification settings

pitops/ckeditor5-imgur-uploader

Repository files navigation

CKeditor5 Imgur Uploader

A plug-n-play uploader for uploading images to imgur directly.

Instructions

npm install ckeditor5-imgur-uploader

Generate Imgur CLIENT ID

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.

Examples

With no framework

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

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}
    />
  )
}

Contributions

Pull requests are welcome, so feel free to contribute!

About

Ckeditor5 custom uploader for imgur -with or without using a framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published