Closed jorge9200 closed 6 years ago
It would be wonderful, look if it's to complicated and we will decide.
Need to tweek thrid party plugin, Yes it is complicated!
@javiergarmon told me that maybe can be an easier way to do it. He will write it here and we'll comment it.
Yes please suggest me if we can do it without touching third party plugin.
Hi @burhan-project-manager !
Good news! horbito has an event in the hole platform. Here is an example:
// Item where the event will be catch. In your case this is a good start point.
var domItem = $('.hrgmail_newMessage_popup')
domItem.on( 'wz-dropenter', function( e, item ){
// Use this event to highlight the UI
})
domItem.on( 'wz-dropleave', function( e, item ){
// Use this event to remove the highlight the UI
})
domItem.on( 'wz-drop', function( e, item, list ){
// list is an array of objects. Each object has an attribute fsnode
})
Here is everything you need to continue. The logic inside 'wz-drop'
event should be very similar to the selectSource()
callback logic that you have implemented.
@javiergarmon i have tried it but those events are not triggering when we drag & drop files over any element. Even wz-dropenter and wz-dropleave are not triggering.
Do we need some permission in info.json in order to make it work?
I forgot one detail. The element where you want to drop the file must have the class wz-drop-area
.
@javiergarmon thanks for it. But it is still not working. I can trigger other events on that element like "mousemove" but wz-dropenter and wz-dropleave are not working.
Tested it with completely new elements also.
Hmmm.. That's weird. Please, leave that class in your code, I will check it as soon as possible
Done. Closed!
I am afraid if that enhancement can be implemented. We are using a third party WYSIWYG editor. We will need to customize it in order to enable drag & drop.