-
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
Disable fileDragging #876
Comments
The following appears to do what you want by returning the desired response ( Lines 289 to 294 in df8bde1
new MediumEditor(editorNode, {
extensions: {
'imageDragging': new YourCustomExtension(),
},
}); |
Are you using custom imageDragging extension ? If yes than @gpbmike solution will work for you. You should also checkout following cases:
source: Lines 405 to 414 in df8bde1
|
Apologies for this being very confusing, but so is this concept of allowing custom file dragging extensions in a good way, while not breaking people who are depending on the deprecated image-dragging extension! If I can remember correctly after re-reading the code, we still support a custom option for enabling/disabling drag & drop of images (the deprecated So, if you wanted to do some custom drag & drop behavior, I would recommend doing what @gpbmike suggested, and passing your own custom extension to handle this. You can build off of the existing file-dragging extension by extending it before you pass it in, and overriding some of these parts which are what handling preventing drag & drop. var YourFileDraggingExtension = MediumEditor.extensions.fileDragging.extend({
// override the things you want to change
});
new MediumEditor(editorNode, {
extensions: {
'imageDragging': new YourCustomExtension(),
}
}); |
Thanks for your help! new MediumEditor(editorNode, {
extensions: {
'imageDragging': {}
}
}); |
I'm using mediumEditor with a custom drag'n drop behavior but it seems that MediumEditor is catching all dragover / drop events.
I tried to disable this behavior with
imageDragging: false
andfileDragging: false
but it's not working.At the moment, the only solution I found out was to comment out this line
extension = new MediumEditor.extensions.fileDragging(opts);
Thanks for your help
The text was updated successfully, but these errors were encountered: