Alexander Kim
Alexander Kim

Reputation: 11

How do enable multi select image in CKFinder?

html:

<form action="/" method="POST" enctype="multipart/form-data">
<textarea name="#" id="ckfinder-widget" cols="30" rows="10"></textarea>
<button>Submit</button>
</form>
<script src="ckeditor/ckeditor.js"></script>
<script src="ckfinder/ckfinder.js"></script>
<script>
var editor = CKEDITOR.replace('ckfinder-widget');
var finder = CKFinder.setupCKEditor(editor, '/ckfinder/');
</script>

in ckfinder/config.js i'm add config.selectMultiple = true;

var config = {};
config.selectMultiple = true;
CKFinder.define( config );

but I can not select more than one picture

Upvotes: 0

Views: 2478

Answers (2)

Rami Zebian
Rami Zebian

Reputation: 559

You can add the below plugins to the CKEditor's plugins folder and the below code to the config.js file:

config.extraPlugins = 'uploadfile';
config.extraPlugins = 'uploadwidget';
config.extraPlugins = 'widget';
config.extraPlugins = 'lineutils';

This way, you can drag & drop images directly to your editor and the images will be uploaded to the correct path that you've already configured in the CKFinder config file.

Upvotes: 0

jodator
jodator

Reputation: 2475

You cannot select more then one file when browsing server in CKEditor integration because CKEditor's dialog is designed to support single file manipulation. Only the first selected file is returned.

You can select multiple files when using it's API on a web page, though.

Upvotes: 1

Related Questions