code: public void openFormEditor(
          final CmsEditorContext context,
          final String locale,
          String elementId,
          String clientId,
          final String newLink,
          final CmsUUID modelFileId,
          final String postCreateHandler,
          final String mode,
          final String mainLocale,
          final CmsEditHandlerData editHandlerData,
          final I_CmsSimpleCallback<Boolean> onClose) {
  
          m_onClose = onClose;
          m_clientId = clientId;
          initEventPreviewHandler();
          final CmsUUID structureId = new CmsUUID(elementId);
  
          I_CmsSimpleCallback<Boolean> callback = new I_CmsSimpleCallback<Boolean>() {
  
              public void execute(Boolean arg) {
  
                  if (arg.booleanValue()) {
                      loadInitialDefinition(
                          CmsContentDefinition.uuidToEntityId(structureId, locale),
                          newLink,
                          modelFileId,
                          mode,
                          postCreateHandler,
                          mainLocale,
                          editHandlerData,
                          context.getSettingPresets(),
                          new I_CmsSimpleCallback<CmsContentDefinition>() {
  
                              public void execute(CmsContentDefinition contentDefinition) {
  
                                  if (contentDefinition.isModelInfo()) {
                                      openModelSelectDialog(context, contentDefinition);
                                  } else {
                                      initEditor(context, contentDefinition, null, false, null);
                                  }
                              }
                          });
                  } else {
                      showLockedResourceMessage();
                  }
  
              }
          };
          // make sure the resource is locked, if we are not creating a new one
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(newLink)) {
              callback.execute(Boolean.TRUE);
          } else {
              CmsCoreProvider.get().lock(structureId, callback);
          }
      }
docs: Opens the content editor dialog.<p>
  
  @param context the editor context
  @param locale the content locale
  @param elementId the element id
  @param clientId the container element client id if available
  @param newLink the new link
  @param modelFileId the model file id
  @param postCreateHandler the post-create handler class (optional)
  @param mode the content creation mode
  @param mainLocale the main language to copy in case the element language node does not exist yet
  @param editHandlerData the edit handler data, if we are using an edit handler to create a new element; null otherwise
  @param onClose the command executed on dialog close