code: void insertDropElement(
          CmsContainerElementData elementData,
          I_CmsDropContainer container,
          int index,
          CmsContainerPageElementPanel draggable,
          String modelReplaceId) {
  
          try {
              CmsContainerPageElementPanel containerElement = m_controller.getContainerpageUtil().createElement(
                  elementData,
                  container,
                  m_isNew);
              if (m_isNew) {
                  containerElement.setNewType(CmsContainerpageController.getServerId(m_draggableId));
              } else {
                  m_controller.addToRecentList(elementData.getClientId(), null);
              }
  
              if (index >= container.getWidgetCount()) {
                  container.add(containerElement);
              } else {
                  container.insert(containerElement, index);
              }
              if (draggable != null) {
                  draggable.removeFromParent();
              }
              m_controller.initializeSubContainers(containerElement);
  
              if (modelReplaceId != null) {
                  m_controller.executeCopyModelReplace(
                      modelReplaceId,
                      ((CmsContainerPageContainer)container).getFormerModelGroupParent(),
                      m_controller.getCachedElement(m_draggableId));
              }
  
              if (!m_controller.isGroupcontainerEditing()) {
                  if (containerElement.hasReloadMarker()) {
                      m_controller.setPageChanged(new Runnable() {
  
                          public void run() {
  
                              CmsContainerpageController.get().reloadPage();
                          }
                      });
                  } else {
                      m_controller.setPageChanged();
                  }
              }
              if (m_controller.isGroupcontainerEditing()) {
                  container.getElement().removeClassName(
                      I_CmsLayoutBundle.INSTANCE.containerpageCss().emptyGroupContainer());
              }
  
          } catch (Exception e) {
              CmsErrorDialog.handleException(e.getMessage(), e);
          }
      }
docs: Inserts e new container element into the container once the drag and drop is finished.<p>
  
  @param elementData the element data to create the element from
  @param container the target container
  @param index the element index
  @param draggable the original drag element
  @param modelReplaceId the model replace id