As soon as I migrate a Div element into custom code I cannot drag'n'drop other components on it anymore. However you might be able to recognize an opening xml tag and a matching closing xml tag in my custom code. I think this is sufficient to make the custom code able to receive dropped elements:
<some_tag_maybe_a_div>
whatever I wrote
<!-- this is where the dropped element goed -->
</some_tag_maybe_a_div>
Maybe you also need to add an attribute so select whether the dropped elements will be blaced at the end (as shown here) or at the beginning (before "whatever I wrote").