code: public void setEditorModeInSession(final EditorMode editorMode) {
  
          CmsRpcAction<Void> action = new CmsRpcAction<Void>() {
  
              @Override
              public void execute() {
  
                  getService().setEditorMode(editorMode, this);
              }
  
              @Override
              protected void onResponse(Void result) {
  
                  // nothing to do
  
              }
          };
          action.execute();
      }
docs: Sets the editor mode in the user session.<p>
  
  @param editorMode the editor mode