KendoEditor + dropTarget

3 posts, 0 answers
  1. Monish
    Monish avatar
    4 posts
    Member since:
    Sep 2012

    Posted 18 Sep 2012 Link to this post


    I am trying to implement a scenario where user can drop nodes from the tree to an editor. By default all the nodes are draggable of the kendo treeview control so I have to remove the dragAndDrop and use kendoDraggable so that parent nodes are not draggable. This is working fine by using templates.

    Now, for the editor part, if I apply kendoEditor to the textarea and make it kendoDropTarget, the drop functionality is not working. However this works if I keep textarea as it is (without kendo editor) and apply kendoDropTarget to the textarea. Not sure what I am missing?

    The code snippet is share at:


  2. Nohinn
    Nohinn avatar
    167 posts
    Member since:
    Feb 2011

    Posted 18 Sep 2012 Link to this post

    the kendoEditor() function hides the textarea and instead uses a table and an iframe, that's why it stops working for you as the textarea dom element is not visible anymore.
    I don't think there is any easy way to make it work within the editor's iframe, as the iframe is like a different environment for your application.

    P.S: This is the only thing I've been able to do with your sample as you will see, when the node drag starts I'm drawing an overlay over the iframe, so the iframe does not capture the mouse. I apply the kendoDropTarget to this overlay, and in the drop event I have set to "insert" a copy of the hint inside the iframe.
  3. Dominic
    Dominic avatar
    1 posts
    Member since:
    May 2013

    Posted 26 Sep 2013 Link to this post

    I know this thread is over a year old but thought I would post my solution in case you didn't get it working. 

    I based my solution on both of your jsfiddles (Using a div overlay and not using the treeviews built in drag and drop). 
    It is quite hacky and definitely needs tidying up/re-factoring but I hope this helps. 
    Note: Having the paragraphs causes this to not work properly in IE. If you remove the <p> tags it works fine. 
    I have tested this in IE10, Firefox 24 and chrome 29.

Back to Top