code: void saveAndExit() {
  
          boolean unlock = shouldUnlockAutomatically();
          // store the scroll position
          final int scrollTop = RootPanel.getBodyElement().getOwnerDocument().getScrollTop();
          saveAndDeleteEntities(unlock, new I_CmsSimpleCallback<Boolean>() {
  
              public void execute(final Boolean hasChangedSettings) {
  
                  setSaved();
                  if (m_onClose != null) {
                      m_onClose.execute(Boolean.valueOf(m_hasChangedSettings || hasChangedSettings.booleanValue()));
                  }
                  clearEditor();
                  // restore the scroll position
                  RootPanel.getBodyElement().getOwnerDocument().setScrollTop(scrollTop);
              }
          });
      }
docs: Saves the content and closes the editor.<p>