Editor Content Area - Disable Drag&Drop of external elements

2 posts, 0 answers
  1. helpdesk
    helpdesk avatar
    1 posts
    Member since:
    Nov 2015

    Posted 18 Nov 2015 Link to this post

    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.

  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 19 Nov 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top