What is @ckeditor/ckeditor5-upload?
@ckeditor/ckeditor5-upload is a plugin for CKEditor 5 that provides file upload capabilities. It allows users to upload images and other files directly within the editor, enhancing the content creation experience.
What are @ckeditor/ckeditor5-upload's main functionalities?
Simple Upload Adapter
This feature allows you to configure a simple upload adapter that sends files to a specified server endpoint. The server should handle the file storage and return the URL of the uploaded file.
ClassicEditor.create(document.querySelector('#editor'), { extraPlugins: [SimpleUploadAdapter], simpleUpload: { uploadUrl: 'https://your-upload-endpoint.com/upload' } })
Base64 Upload Adapter
This feature enables the Base64 upload adapter, which converts files to Base64 strings and embeds them directly into the content. This is useful for quick prototyping or when you don't have a server-side upload handler.
ClassicEditor.create(document.querySelector('#editor'), { extraPlugins: [Base64UploadAdapter] })
Custom Upload Adapter
This feature allows you to create a custom upload adapter by defining your own upload logic. This is useful when you need more control over the upload process or need to integrate with a specific backend service.
class MyUploadAdapter { constructor(loader) { this.loader = loader; } upload() { return this.loader.file.then(file => new Promise((resolve, reject) => { const data = new FormData(); data.append('file', file); fetch('https://your-upload-endpoint.com/upload', { method: 'POST', body: data }) .then(response => response.json()) .then(result => resolve({ default: result.url })) .catch(reject); })); } } ClassicEditor.create(document.querySelector('#editor'), { extraPlugins: [function(editor) { editor.plugins.get('FileRepository').createUploadAdapter = loader => new MyUploadAdapter(loader); }] })
Other packages similar to @ckeditor/ckeditor5-upload
quill-image-uploader
quill-image-uploader is a module for the Quill rich text editor that provides image upload capabilities. It allows users to upload images directly within the editor. Compared to @ckeditor/ckeditor5-upload, it is specific to the Quill editor and offers similar functionality for image uploads.
react-dropzone
react-dropzone is a React component for handling file uploads via drag and drop. While it is not specific to any rich text editor, it can be integrated with various editors to provide file upload capabilities. It offers more flexibility in terms of how files are uploaded and handled compared to @ckeditor/ckeditor5-upload.
43.0.0 (August 7, 2024)
We are happy to announce the release of CKEditor 5 v43.0.0.
Release highlights
Merge fields
The new merge fields feature is a game-changer for creating document templates and other kinds of personalized or dynamic content. Thanks to this feature, you can insert placeholders into your content, indicating where actual values should go. These places are marked in the final content in a distinctive way, making it easy to later process the template and fill it with the actual values. The feature supports a preview mode too - you can define preview data sets, and see how the content will look like when real values are used directly in the editor. The plugin is highly customizable to fit various applications and scenarios. Finally, merge fields are fully integrated with our Export to Word, Export to PDF, and Import from Word features, both when they are used from the editor and via REST API.
We are extremely happy to share with you this highly demanded feature, and we cannot wait to listen to your feedback!
Make sure to visit our builder or documentation to learn more about the feature.
Export to Word V2 as the default version
The V2 version of the export to Word feature introduced significant improvements, optimizations, and fixes. This update enhances the overall performance, making the export process faster and more reliable, especially for large documents. Key improvements include better handling of table borders, automatic detection of Word styles from CSS, and support for more text-related CSS properties, ensuring your documents maintain their intended formatting.
Starting this version, the V2 configuration becomes the default in the ExportWord
plugin. Make sure to migrate your configuration if you are using it.
Improved sidebar accessibility and navigation
We have introduced multiple enhancements to make the sidebar more accessible. Among other improvements, you can now use the <kbd>Shift</kbd>+<kbd>Ctrl</kbd>+<kbd>E</kbd> keystroke to move focus from the editor marker to the active annotation. When your comment reply is ready, you can quickly submit it using the new <kbd>Ctrl</kbd>+<kbd>Enter</kbd> shortcut. Also, navigation from one annotation to another is now possible by using arrow keys.
The full lists of keyboard supported actions can be reviewed in our Accessibility support guide.
Important bug fixes and improvements
This release brings notable bug fixes and improvements to enhance your editing experience.
- Several improvements have been made to typing in the editor, especially for Android IME and Safari. On Android, issues like duplicated characters and reverse writing effects have been resolved. In Safari, the reverse typing effect after focus change has been fixed.
- A couple of UI improvements:
- We replaced the visual indication of the selected option in dropdowns (blue background) with the checkbox marks to better indicate selected options, aligning visual cues across the toolbar and menu bar.
- All editor types now support the menu bar.
- Additionally, the special characters UI has been moved from a dropdown to a dialog. This unifies the action between the menu bar and toolbar, and also gives content creators quicker access to the always-on-top dialog.
- We have improved the drawing of page break line algorithm to address the pagination feature issues. We also improved the performance of the plugin.
React and Vue integrations updates
We have released new major versions of the React and Vue integrations. In both of them, we have migrated to JavaScript modules (ESM) and rewritten large parts of the codebases to support the latest versions of these frameworks and to follow the latest recommendations for writing the components.
We strongly recommend that you follow the release highlights to update to the latest versions: