Documentation
Upload
dragUpload
Type: Boolean
Default: true
Turns off drag and drop image and files uploads.
$R('#content', {
dragUpload: false
});
multipleUpload
Type: Boolean
Default: true
Redactor can accept multiple images/files simultaneously and upload them all to your server by default. You can turn it off:
$R('#content', {
multipleUpload: false
});
clipboardUpload
Type: Boolean
Default: true
Redactor is able to accept images/files from clipboard and upload them to the server as any normally dropped image/file would; it is designed to let users quickly paste files into Redactor. This setting allows you to choose whether to allow clipboard uploads or not. At this time, this feature works in latest Firefox (Mac and Windows), Chrome (Mac and Windows) and Internet Explorer Edge.
You can turn it off:
$R('#content', {
clipboardUpload: false
});
uploadData
Type: Boolean
Object
Default: false
This setting allows you to send POST params to both of your image or file upload script.
$R('#content', {
fileUpload: '/myadmin/files/upload/',
uploadData: {
id: 10,
elements: '#my-input-1, #my-input-2, #my-form'
}
});
The example above shows how to send POST params with uploading. The data object has key=value params, including values in the input and form fields if the additional object has key elements
with field and form selectors.
The values of the input and form fields are appended as values: field-name: value
.