This question may have already answers but none of them is Angular specific. Here are some of them
I am using Angular 5 and following this documentation to implement ckeditor5-angular.
But I am having issue with image uploading, when I try uploading image it says in the browser console.
filerepository-no-upload-adapter: Upload adapter is not defined. Read more: https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html#error-filerepository-no-upload-adapter
I have tried searching for this issue and was able to find a lot of solutions, but literally I couldn't understand a single of them because they were not Angular specific.
Please help how can I upload image.
Thank you for everyone answer. I create code snippet for anyone who want looking the example. But I used ckeditor inline build. Hope it help.
stackblitz
I used the below seems to work
class UploadAdapter {
constructor( loader ) {
this.loader = loader;
}
upload() {
return this.loader.file
.then( file => new Promise( ( resolve, reject ) => {
var myReader= new FileReader();
myReader.onloadend = (e) => {
resolve({ default: myReader.result });
}
myReader.readAsDataURL(file);
} ) );
};
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With