Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Identifying a Drop event in HtmlEditor
posted

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?

Parents
No Data
Reply
  • 1100
    Offline posted

    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

Children