0

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

Alexander Kim
  • 11
  • 1
  • 5

2 Answers2

1

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.

jodator
  • 2,445
  • 16
  • 29
  • Thanks you for answer. I add config.chooseFiles = true; in ckfinder/config.js and config.chooseFiles = true; in ckeditor/config.js , but , no result. Then i add ` var editor = CKEDITOR.replace('ckfinder-widget'); var finder = CKFinder.setupCKEditor(editor); finder.on('files:choose', function (evt) { var files = evt.data.files; var chosenFiles = ''; files.forEach(function (file, i) { chosenFiles += ( i + 1 ) + '. ' + file.get('name') + '\n'; }); alert(chosenFiles); });` but , no result. – Alexander Kim May 24 '16 at 04:51
0

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.

Rami Zebian
  • 539
  • 1
  • 5
  • 23