docs: public void render() throws IOException {
  
          I_CmsFormatterBean formatterConfig = OpenCms.getADEManager().getCachedFormatters(
              m_cms.getRequestContext().getCurrentProject().isOnlineProject()).getFormatters().get(
                  m_element.getFormatterId());
          if (formatterConfig instanceof CmsFlexFormatterBean) {
              CmsFlexFormatterBean config = (CmsFlexFormatterBean)formatterConfig;
              String template = config.getStringTemplate();
              if (m_element.isInMemoryOnly()) {
                  if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(config.getPlaceholderStringTemplate())) {
                      template = config.getPlaceholderStringTemplate();
                  }
                  if (config.getDefaultContentStructureId() != null) {
                      try {
                          CmsResource defaultContent = m_cms.readResource(
                              ((CmsMacroFormatterBean)formatterConfig).getDefaultContentStructureId());
                          CmsFile defaultFile = m_cms.readFile(defaultContent);
                          m_element = new CmsContainerElementBean(
                              defaultFile,
                              m_element.getFormatterId(),
                              m_element.getIndividualSettings(),
                              true,
                              m_element.editorHash(),
                              m_element.isCreateNew());
                      } catch (CmsException e) {
                          //      LOG.error("Error reading default content for new resource", e);
                      }
                  }
              }
              try {
                  Map<String, Object> context = new HashMap<String, Object>();
                  context.put(KEY_SETTINGS, wrapSettings(m_cms, m_element.getSettings()));
                  context.put(
                      KEY_FUNCTIONS,
                      CmsCollectionsGenericWrapper.createLazyMap(new CmsObjectFunctionTransformer(m_cms)));
                  String output = renderTemplate(m_cms, template, m_element.getResource(), context);
                  if (CmsJspTagEditable.isEditableRequest(m_request)) {
                      CmsHtmlValidator validator = new CmsHtmlValidator();
                      validator.validate(output);
                      if (!validator.isBalanced()) {
                          Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
                          String messages = "";
                          for (CmsMessageContainer message : validator.getMessages()) {
                              messages += message.key(locale) + "\n";
                          }
                          output = String.format(
                              ERROR_DISPLAY_WITH_DETAILS,
                              Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_ERROR_0),
                              formatterConfig.getJspRootPath(),
                              Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_NOT_WELL_FORMED_0),
                              messages);
                      } else if (validator.getRootElementCount() > 1) {
                          Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
                          output = String.format(
                              ERROR_DISPLAY,
                              Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_ERROR_0),
                              formatterConfig.getJspRootPath(),
                              Messages.get().getBundle(locale).key(
                                  Messages.GUI_FORMATTER_RENDERING_MULTIPLE_ROOT_ELEMENTS_0));
                      }
  
                  }
                  m_context.getOut().print(output);
              } catch (Throwable t) {
                  if (CmsJspTagEditable.isEditableRequest(m_request)) {
                      String stackTrace = "";
                      for (StackTraceElement element : t.getStackTrace()) {
                          stackTrace += element.toString() + "\n";
                      }
                      Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
                      m_context.getOut().println(
                          String.format(
                              ERROR_DISPLAY_WITH_DETAILS,
                              Messages.get().getBundle(locale).key(Messages.GUI_FORMATTER_RENDERING_ERROR_0),
                              formatterConfig.getJspRootPath(),
                              t.getMessage(),
                              stackTrace));
                  }
              }
          }
      }