private void doCreateSolutionEditor(UserRequest ureq, Solution solution) {
    String documentName = solution.getFilename();
    VFSItem item = solutionContainer.resolve(documentName);
    if (item == null) {
      solutionContainer.createChildLeaf(documentName);
    } else {
      documentName = VFSManager.rename(solutionContainer, documentName);
      solutionContainer.createChildLeaf(documentName);
    }

    newSolutionEditorCtrl =
        WysiwygFactory.createWysiwygController(
            ureq, getWindowControl(), solutionContainer, documentName, "media", true, true);
    newSolutionEditorCtrl.getRichTextConfiguration().disableMedia();
    newSolutionEditorCtrl.getRichTextConfiguration().setAllowCustomMediaFactory(false);
    newSolutionEditorCtrl.setNewFile(true);
    newSolutionEditorCtrl.setUserObject(solution);
    listenTo(newSolutionEditorCtrl);

    cmc =
        new CloseableModalController(
            getWindowControl(), "close", newSolutionEditorCtrl.getInitialComponent());
    listenTo(cmc);
    cmc.activate();
  }
  /**
   * @param ureq
   * @param control
   */
  public GlossaryDefinitionController(
      UserRequest ureq, WindowControl control, GlossaryItem glossaryItem) {
    super(ureq, control);
    this.glossaryItem = glossaryItem;
    String glossDef = glossaryItem.getGlossDef();

    wCtrl = WysiwygFactory.createWysiwygControllerWithoutFile(ureq, control, null, glossDef, null);
    wCtrl.getRichTextConfiguration().disableMathEditor();
    listenTo(wCtrl);
    putInitialPanel(wCtrl.getInitialComponent());
  }
  private void doEditSolutionEditor(UserRequest ureq, Solution solution) {
    String documentName = solution.getFilename();

    editSolutionEditorCtrl =
        WysiwygFactory.createWysiwygController(
            ureq, getWindowControl(), solutionContainer, documentName, "media", true, true);
    editSolutionEditorCtrl.getRichTextConfiguration().disableMedia();
    editSolutionEditorCtrl.getRichTextConfiguration().setAllowCustomMediaFactory(false);
    listenTo(editSolutionEditorCtrl);

    cmc =
        new CloseableModalController(
            getWindowControl(), "close", editSolutionEditorCtrl.getInitialComponent());
    listenTo(cmc);
    cmc.activate();
  }