Sonu Bamniya
Sonu Bamniya

Reputation: 1115

Image is uploading and pasting but not saving in CKEditor

I'm using ImagePaste plugin to paste the image from word. But the image is not showing after the uploading.

When I paste the image it looks like this

But when I retrieve the image than it doesn't appear.

Upvotes: 0

Views: 3312

Answers (1)

oleq
oleq

Reputation: 15895

To automatically upload pasted image, you'll need:

  1. A file manager (like CKFinder).
  2. Upload Image plugin.
  3. A properly configured CKEditor.

The configuration could look like this:

CKEDITOR.replace( 'editor2', {
    extraPlugins: 'uploadimage,image2',
    height: 300,

    // Upload images to a CKFinder connector (note that the response type is set to JSON).
    uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json',

    // Configure your file manager integration. This example uses CKFinder 3 for PHP.
    filebrowserBrowseUrl: '/ckfinder/ckfinder.html',
    filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?type=Images',
    filebrowserUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
    filebrowserImageUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'
} );

There's an official guide about uploading files using CKEditor.

Upvotes: 4

Related Questions