Hi,
In the HtmlEditor when I drag and drop an image from web, the image gets rendered in the HtmlEditor, but the ondrop event doesn't get triggered. I need to write some code when an image is getting dragged and dropped into a HtmlEditor. the OnPaste event works. Is this a bug or do you have any code to make the onDrop event work?
Hello Gowri,
Thank you for contacting the Infragistics support!
The reason you are not able to trigger the onDrop event in your scenario is that the WebHTMLEditor input field is actually placed inside an iframe. You should add the event listener to the actual element that is placed inside this iframe.
I am attaching an example of how this can be achieved. In my sample, I am getting the URL of the image that is dragged from another browser or tab into the WebHTMLEditor and I am showing it inside an alert message. You can use the same logic and modify it as you need in your specific case.
Please, if you have another questions, on this matter or another, do not hesitate to contact me again.WebHTMLEditor.zip
Thanks for your support Alex.
Let me try the solution and get back if it doesn't work.