-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pasting does not trigger editablePaste #1098
Comments
Which kind of file are your dropping in the editor, an image, a text file? |
For instance, I paste a picture copied in the clipboard from a web page. |
Didn't took time to look at it, but we rewrote the pasting part recently, it might be related. |
This is definitely a result of the new code. Right click paste fires the event correctly, but keyboard paste does not. This is because when we capture the CTRL + V command we change which element the user will actually paste into. Since this element is not within the editor, the actual I can get a fix for this in soon, thanks a ton for point this out @JeanCarriere ! |
@JeanCarriere the fix for this is ready (#1099), as soon as it's merged in we'll cut a new patch release so you'll have the fix available. Thanks again for pointing out this issue. |
@JeanCarriere for the case where you weren't able to copy and paste an image in, I wasn't able to reproduce it...what options are you passing when you initialize medium-editor? There are some paste related options you'll have to configure to ensure the images will show up Are you setting |
The options I have are :
|
In order for the html to come through (and for images to not be ignored), you'll need to set |
Description
Copy and pasting a file in the editor does not trigger editablePaste event
Steps to reproduce
Expected behavior:
The subscribed function should be called
Actual behavior:
It's not called
There is an error in the console :
Uncaught TypeError: Cannot read property 'split' of undefined
a.Extension.extend.doPaste @ medium-editor.min.js:3
Versions
The text was updated successfully, but these errors were encountered: