Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Julian367 opened this issue Aug 28, 2022 · 2 comments

Comments

@Julian367
Copy link

Julian367 commented Aug 28, 2022

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 Julian367 reopened this Aug 28, 2022
@Julian367 Julian367 changed the title Paste from word is not working Copy paste from word in quill editor insert image instead of text Aug 28, 2022
@Julian367 Julian367 changed the title Copy paste from word in quill editor insert image instead of text Copy and paste from Word into the pen editor, insert an image instead of text Aug 29, 2022
@Julian367
Copy link
Author

Any one have the same problem?

@singleseeker
Copy link

I have the same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants