froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.3k stars 672 forks source link

Pasting image doesn't trigger the beforeUpload event #2131

Closed natcohen closed 7 years ago

natcohen commented 7 years ago
Expected behavior.

Copying an image from one froala editor to another one should trigger the beforeUpload event

Actual behavior.

Copying an image from one froala editor to another doesn't trigger the beforeUpload event

Steps to reproduce the problem.

I transform my uploaded images to base64 following this toturial and it works well. I have two froala editors on the same page and whenever I copy one image (ctrl-c/cmd-c) from one froala editor to the other, the copied image is not base64. I concluded that it copying/pasting doesn't trigger the beforeUpload event.

OS.

OSX

Browser.

Chrome

stefanneculai commented 7 years ago

@natcohen could you please make a jsFiddle for it?

natcohen commented 7 years ago

@stefanneculai AFAIK, it is impossible to use froala in jsFiddle due to activation key! Please provide a jsFiddle base with froala configured (with image support) and I can show it to you...

stefanneculai commented 7 years ago

@natcohen https://codepen.io/Froala/pen/PpgxGL

natcohen commented 7 years ago

Ok go here: https://codepen.io/anon/pen/MvmQod

  1. Upload an image with drag/drop (or with the image button).
  2. Look at the source code, you should see the image in base64
  3. Leave the source view and go back to the editor view
  4. Click on the image you just added and do ctrl-c/cmd-c
  5. Click wherever on the editor and paste the image ctrl-v/cmd-v
  6. Check the source and you should see that your pasted image is not a base64 as it should!