fileUpload not triggered when image is copy pasted into wax
Images that are pasted into the editor are not uploaded via the fileUpload handler. This is causing issues when trying to export the content of the editor in different formats, because there is no fileId attribute and no url from where to download the image
Expected behaviour
When pasting an image, it should trigger the fileUpload handler, same as when adding images via the toolbar button
Current behaviour
Images that are pasted are not uploaded. Instead, a base64 string is saved as the src of the image object
Steps to reproduce
The bug was observed in the hhmi project
-
copy an image in the file system
-
paste it inside the editor
-
in the editor content object, a base64 string is stored as the image src
-
no image upload happens
Environment
Any browser
Possible solution
Either the pasting of images should be blocked, or it should trigger the upload process just as adding images via the toolbar button does