Draggable, droppable, contenteditable

I have 11 div blocks which I need to be draggable and droppable (swapping with another div block).

However I also need the user to be able to assign each div a name (contenteditable).

I have achieved each separately but cannot get them working together. If it’s draggable then it’s not editable and vice versa.

Can anyone help? The two “edit me” blocks are my attempts.