Image paste Plugin for CKEditor

Introduction

This is a plugin that automatically uploads to the server the images pasted from the clipboard with Firefox in CKEditor.

Author:

Alfonso Martínez de Lizarrondo

Version history:

  1. 1.0: 28-September-2011. First public version.
  2. 1.1: 7-October-2013. Compatibility with CKEditor 4. Sorry to everyone that has tried to use it before, but I didn't realize that it was broken all along as it's a simple fix that I did long ago in the commercial version.
    At the same time, I'm removing the useless "webkit-fake-url" crap that Safari generates but that it can't be used for anything.

Installation

1. Copying the files

Extract the contents of the zip in you plugins directory, so it ends up like this

ckeditor\
	...
	images\
	lang\
	plugins\
		...
		imagepaste\
			plugin.js
			docs\
				install.html
		...
	skins\
	themes\

2. Adding it to CKEditor

Now add the plugin in your config.js or custom js configuration file: config.extraPlugins='imagepaste';

3. Configuration

You have to configure the filebrowserImageUploadUrl entry as you might have already done to allow the user to upload images. You can get a simple script to use as a guide for your code in this post in my blog.

4. Use it

Using Firefox, paste an image into the body of CKEditor. That image will be uploaded to the server and it will use the correct URL instead of "data:".

Disclaimers

CKEditor is © CKSource.com