Hi,
you can try the example below. note that, it only work with the text content not the control, the editor has its own drop function handler for the control, so does not support to use the javascript way to catch it.
- <%@ Page Language="c#" ValidateRequest="false" %>
-
- <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>example</title>
- </head>
- <body>
- <form id="Form1" method="post" runat="server">
- <RTE:Editor runat="server" ID="Editor1" Height="260px" />
- </form>
- </body>
- </html>
- <script type='text/javascript'>
- function editor_document_ondragstart(e) {
- alert(1);
- }
- function AttachEditorEvent(editor) {
- var win = editor.GetWindow();
- var doc = win.document;
- if (doc.addEventListener) {
- doc.addEventListener("dragstart", editor_document_ondragstart, false);
- }
- else {
- doc.attachEvent("ondragstart", editor_document_ondragstart);
- }
- }
-
- function RichTextEditor_OnLoad(editor) {
- AttachEditorEvent(editor);
-
- }
- </script>
Regards,
Ken