Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mehdibo/ckeditor-uploadfile
CKEditor plugin to upload files using AJAX
https://github.com/mehdibo/ckeditor-uploadfile
ajax ckeditor ckeditor-plugin file-upload
Last synced: 21 days ago
JSON representation
CKEditor plugin to upload files using AJAX
- Host: GitHub
- URL: https://github.com/mehdibo/ckeditor-uploadfile
- Owner: mehdibo
- License: mit
- Created: 2018-03-18T18:17:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-03-18T18:40:57.000Z (over 6 years ago)
- Last Synced: 2024-10-08T15:26:05.029Z (about 1 month ago)
- Topics: ajax, ckeditor, ckeditor-plugin, file-upload
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-morocco - Ckeditor-uploadfile - uploadfile.svg?style=social)](https://github.com/mehdibo/ckeditor-uploadfile/stargazers) - CKEditor plugin to upload files (Uncategorized / Uncategorized)
README
# ckeditor-uploadfile
This is a tiny CKEditor to upload files insinde your editor.# Installation
Move the `plugin` folder inside your CKEditor plugins folder and enable it in your `config.js`
by adding `uploadFile` to `config.extraPlugins`# Configuration
Available configurations are:uploadFile: {
accept: '.png,.jpg,.jpeg,.gif,.pdf', // Allowed extensions, * to allow all files
maxFileSize: 0, // Maximum size in bytes
uploadHandler: 'URL', // URL to the file upload handler (to where submit the file)
inputName: 'file', // File name (input name)
extraFormData: { // Any extra form data that should be sent with the request
'name': 'value',
},
},# Usage
The upload handler must return a JSON response containing the URL to the file and a 200 status header.
If you want to pass an error message, you need to set the status header to 500 (or any other error header) and pass the message
along the header, for example in PHP:`header('Status: 500 The file you uploaded is too big');`
# Contributions
If you have any suggestions or report please open an issue or a pull request, all contributions are welcome.