Git Product home page Git Product logo

dropler's Introduction

#Dropler

###Update:

Hello, Internet!

This was something quickly cobbled together in an hour or so to scratch an itch on my blog's admin page. So, there's a lot of stuff it won't do, wasn't made to do, wasn't planned to do, and flat out shouldn't do (like exposing S3 keys to the wild!). With said itch having been scratched, work on this has come to an end.

In short: It is not supported software!

Feel free to try it out or learn from the code. Maybe it'll work well for your needs, but if it doesn't, welp, you're on your own ^_^


Dropler is a small, lightweight (and free!) CKEditor plugin for uploading images via drag and drop.

It's like SimpleUploads but free! And with fewer features!

Dropler currently supports Imgur and Amazon's S3 as storage locations.

##Live Demo:

You can checkout a live demo here.


##Install:

You can install it anually straight from github.

Clone or download this respository and then follow the Manual Installation instructions from the official CKEditor Documentation. Adding to CKEditor's Add-on repository pending.

The super short version: Copy the dropler folder to the plugins directory of ckeditor.

##Usage Instructions

First, add the plugin name to ckeditor's extraPlugins property inside of config.js:

CKEDITOR.editorConfig = function( config ) {
  // rest of config
  config.extraPlugins = 'dropler';    <-- add the plugin
})

Next, we need to supply a few configuation options depending on the backend service we're using. This is a simple javascript object consisting of 1. The name of the backend service, and 2. the settings it needs to function.

Currently Imgur and S3 are the two upload locations supported, but, since uploading files boils down to submitting a POST towards the general direction of a server, new backends are trivial to implement.

Imgur:

CKEDITOR.editorConfig = function( config ) {
  // rest of config
  config.extraPlugins = 'dropler';
  
  // configure the backend service and credentials
  config.droplerConfig = {
      backend: 'imgur',
      settings: {
          clientId: 'YourImgurClientID'
      }
  }
});

AWS S3:

CKEDITOR.editorConfig = function( config ) {
  // rest of config
  config.extraPlugins = 'dropler';
  
  // configure the backend service and credentials
  // aws requires a few extra.. 
  config.droplerConfig = {
      backend: 's3',
      settings: {
          bucket: 'bucketname',
          region: 'your-region',
          accessKeyId: 'key',
          secretAccessKey: 'secret-key'
      }
  };
}); 

Note: This, of course, exposes your S3 keys to the wild. So.. probably shouldn't use this outside of testing -- or for very highly trusted users (eg. yourself).

dropler's People

Contributors

chriskiehl avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.