airtonzanon / Dropler

A drag and drop Image upload plugin for CKEditor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dropler

Fork From:

https://github.com/chriskiehl/Dropler

Changes:

I just did a change to be uploading with a local file, created by yourself. Here have an example ImageUpload-sample.php


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

It's like SimpleUploads but free!


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 the plugin send POST data to a file and there upload to your server.

Local:

CKEDITOR.editorConfig = function( config ) {
    // rest of config
    config.extraPlugins = 'dropler';

    // configure the backend service and credentials
    config.droplerConfig = {
        backend: 'basic',
        settings: {
            uploadUrl: 'file-created-by-yourself'
        }
    };
});

About

A drag and drop Image upload plugin for CKEditor

License:MIT License


Languages

Language:JavaScript 92.5%Language:PHP 7.5%