code: public void createAndEditNewElement(
          final org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel element,
          final CmsUUID modelResourceStructureId) {
  
          CmsRpcAction<CmsContainerElement> action = new CmsRpcAction<CmsContainerElement>() {
  
              @Override
              public void execute() {
  
                  getContainerpageService().createNewElement(
                      CmsCoreProvider.get().getStructureId(),
                      element.getId(),
                      element.getNewType(),
                      modelResourceStructureId,
                      getLocale(),
                      this);
  
              }
  
              @Override
              protected void onResponse(CmsContainerElement result) {
  
                  openEditorForNewElement(element, result, false);
  
              }
          };
          action.execute();
      }
docs: Creates a new resource for drag container elements with the status new and opens the content editor.<p>
  
  @param element the container element
  @param modelResourceStructureId the model resource structure id