if (relFilePath.endsWith(".html") || relFilePath.endsWith(".htm")) {
editorCtr = WysiwygFactory.createWysiwygController(ureq, getWindowControl(), writableRootContainer, relFilePath, true);
((HTMLEditorController)editorCtr).setNewFile(true);
}
else {
editorCtr = new PlainTextEditorController(ureq, getWindowControl(), (VFSLeaf)writableRootContainer.resolve(relFilePath), "utf-8", true, true, null);
}
this.listenTo(editorCtr);
mainPanel.setContent(editorCtr.getInitialComponent());