ck editor 5 upload image code example

Example: ckeditor with image upload

Inside the config.js of ckeditor add the following code 

CKEDITOR.editorConfig = function( config ) {
	..............
    ..............
    ..............
    
    config.filebrowserUploadMethod = 'form',
	config.filebrowserUploadUrl = '/api/v1/ckeditor/upload-image',
	config.image_previewText = CKEDITOR.tools.repeat(' ', 1);
    
    ..............
    ..............
    ..............
};

For more details :

https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-filebrowserUploadMethod

Tags:

Misc Example