This is a migrated thread and some comments may be shown as answers.

Editor Content Area - Disable Drag&Drop of external elements

1 Answer 9 Views
Editor
This is a migrated thread and some comments may be shown as answers.
helpdesk
Top achievements
Rank 1
helpdesk asked on 19 Nov 2015, 12:43 AM

I have read other threads and tried every proposed solution I could find here, but no success.

Basically I need to disable drag&drop of any of the elements of the page (e.g. website menu links, etc.), of the browser (e.g. address from the address bar etc.), as well as the editor's menu itself.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 19 Nov 2015, 09:08 AM
Hello,

For this case you can just cancel the DOM drop event of the editable element:
<telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad">
</telerik:RadEditor>
 
<script>
    function OnClientLoad(sender, args) {
        $telerik.$(sender.get_contentArea()).bind("drop", function (ev) {
            ev.preventDefault();
        })
    }
</script>

You can also find here a discussion on the matter—http://stackoverflow.com/questions/3033130/contenteditable-div-disabling-drag-and-drop.

Regards,
Ianko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Editor
Asked by
helpdesk
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or