Duplicate a html element by drag and drop

Discussão em 'Angular' iniciado por user6781, Maio 18, 2025.

  1. user6781

    user6781 Guest

    Imagine we have a simple box as following in angular:

    <div style="width: 10%; height: 10%; border: solid;">
    <span>Copy me!</span>
    </div>


    Now I want to duplicate this box by selecting it, dragging it and releasing the mouse so that I have a second box in the new place. What is the best approach to do so? Thank you in advance.

    Please notice that I don't want to copy the content of the <div> (in this case Copy me!) but I want the whole <div></div> with content and style (and latter be able to change the text inside if necessary).

    Continue reading...

Compartilhe esta Página