Integrate drag and drop functionality into Aloha Editor HTML5

98 Views Asked by At

i'm using the Aloha Editor for my school project and i would like if someone could help me to integrate the drag'n drop functionality into the project. I have found this page but they are not specific in their explanations because i don't know where to put some code lines.

1

There are 1 best solutions below

0
luc On

You should be able to bind the query drop event with the editable once it has been created. Then your callback will be called when something is dropped it in the editable.

$(function(){
    Aloha.bind('aloha-editable-created', function(event, editable){
        var the_obj = editable.obj;
        $(editable.obj).bind('drop', function(event){
             alert('something dropped in my editable');
        });
    });
})

I hope it helps