froala

Error when pasting image with CTRL + V FROALA


I started the basic version of Froala with version 4, the problem is that if I paste an image with CTRL + v, it does not appear in the editor because it presents a message that is "Image file type is invalid", but if I use the image icon it uploads without problems and remains visible in the editor. How can I fix it?

Preview error message

This is my code

<script>
  new FroalaEditor('#description',{
   toolbarButtons: ['bold', 'italic', 'underline', 'fontFamily', 'color','paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent','insertImage','insertTable','|', 'undo', 'redo'],
   imageInsertButtons: ['imageBack', '|', 'imageUpload'],
   quickInsertTags: [],
   language: 'es',
   attribution: false,
   charCounterCount: false,
   imageUploadURL: '/upload_files',
   imageUploadParams: {
         _token: "{{ csrf_token() }}",
        id: '{{$model->id}}'
      }
  });
</script>

Solution

  • I had this problem when using the following source

    https://cdn.jsdelivr.net/npm/froala-editor@4.0.4/js/froala_editor.pkgd.min.js

    if i changed to this - it solved the problem

    https://cdnjs.cloudflare.com/ajax/libs/froala-editor/4.0.4/js/froala_editor.min.js