CKEditor 4 reached its End of Life (EOL) in June 2023. From then on, it will receive no more updates, new features, bug fixes, and security patches. Visit CKEditor 5 Docs for the actively supported CKEditor or check Extended Support Model.
Report an issue
Class

CKEDITOR.dialog.definition.file

class inherited

The definition of a file upload input.

This class is not really part of the API. It just illustrates the properties that developers can use to define and create file upload elements.

Once the dialog is opened, the created element becomes a CKEDITOR.ui.dialog.file object and can be accessed with CKEDITOR.dialog.getContentElement.

For a complete example of dialog definition, please check CKEDITOR.dialog.add.

// There is no constructor for this class, the user just has to define an
// object with the appropriate properties.

// Example:
{
    type: 'file',
    id: 'upload',
    label: 'Select file from your computer',
    size: 38
},
{
    type: 'fileButton',
    id: 'fileId',
    label: 'Upload file',
    'for': [ 'tab1', 'upload' ],
    filebrowser: {
        onSelect: function( fileUrl, data ) {
            alert( 'Successfully uploaded: ' + fileUrl );
        }
    }
}

Filtering