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(); }
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(); }