quill-image-uploader icon indicating copy to clipboard operation
quill-image-uploader copied to clipboard

Copy and paste from Word into the pen editor, insert an image instead of text

Open Julian367 opened this issue 2 years ago • 2 comments

Paste from Word is making a photo instead of pasting just text. This happen only on Google Chrome

setup: () => {
    const modules = [{
      name: 'imageUploader',
      module: ImageUploader,
      options: {
        upload: file => {
          return new Promise((resolve, reject) => {
            let Image = Quill.import('formats/image');
            Image.className = 'img-fluid';
            Quill.register(Image, true);
            const formData = new FormData();
            formData.append("image", file);
            axios({
              url: '/api/upload-image',
              method: 'POST',
              data: formData
            }).then((result) => {
              resolve(result.data.url);
              let url = result.data.url;
            }).catch((err) => {
              reject("Upload failed");
              console.error("Error:", error);
            })
          });
        }
      }
    }
    ]
    return {modules}
  },

Julian367 avatar Aug 28 '22 09:08 Julian367

Any one have the same problem?

Julian367 avatar Aug 31 '22 10:08 Julian367

I have the same issue here.

singleseeker avatar Oct 11 '23 05:10 singleseeker