richText = uifactory.addRichTextElementForStringData("mce", null, htmlContent, 14, -1, false, true, qtiPackage.getBaseDir(), null,
formLayout, ureq.getUserSession(), getWindowControl());
RichTextConfiguration richTextConfig = richText.getEditorConfiguration();
// disable <p> element for enabling vertical layouts
richTextConfig.disableRootParagraphElement();
// set upload dir to the media dir
richTextConfig.setFileBrowserUploadRelPath("media");
// manually enable the source edit button
richTextConfig.setQuotedConfigValue(RichTextConfiguration.THEME_ADVANCED_BUTTONS3_ADD, RichTextConfiguration.SEPARATOR_BUTTON + "," + RichTextConfiguration.CODE_BUTTON);
//allow script tags...