See https://github.com/Inflectra/rapise-powerpack/tree/master/WebDragNDrop for implementation and working example.