![]() It passes the URL (or URLs in case of responsive images) to the image upload plugin which replaces the src and srcset attributes of the image placeholder in the editor content. Once the file is uploaded, the upload adapter notifies the editor about this fact by resolving its Promise. When an image is deleted from the editor content before the upload finishes, it aborts the upload process.Displays the progress bar for each of them.While the images are being uploaded, the image upload plugin: the URL to the saved file) back to the file loader (or handle an error, if there was one). The role of the upload adapter is, therefore, to securely send the file to the server and pass the response from the server (e.g.The role of the file loader is to read the file from the disk and upload it to the server by using the upload adapter.The images are intercepted by the image upload plugin (which is enabled in all official editor builds).įor every image, the image upload plugin creates an instance of a file loader. selecting an image through a file system dialog.There are many ways to do that, for instance: The whole process boils down to the following steps:įirst, an image (or images) needs to get into the rich-text editor content. It uses the FileRepository API to spawn upload adapter instances, triggers the image upload ( UploadAdapter.upload()) and finally uses the data returned by the adapter's upload promise to update the image in the editor content.īefore you can implement your own custom upload adapter, you should learn about the image upload process in CKEditor 5. ![]() This particular plugin handles user actions related to uploading images. when a file is dropped into the content) by uploading files to the server and updating the edited content once the upload finishes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |