Search in sources :

Example 6 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project openolat by klemens.

the class HTMLRawPageElementHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints options) {
    String content = "";
    if (element instanceof HTMLPart) {
        content = ((HTMLPart) element).getContent();
        content = Formatter.formatLatexFormulas(content);
    }
    TextComponent cmp = TextFactory.createTextComponentFromString("htmlRawCmp" + CodeHelper.getRAMUniqueID(), content, null, false, null);
    cmp.setElementCssClass("o_pf_html_raw");
    return new PageRunComponent(cmp);
}
Also used : TextComponent(org.olat.core.gui.components.text.TextComponent) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) HTMLPart(org.olat.modules.portfolio.model.HTMLPart)

Example 7 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project openolat by klemens.

the class HTMLRawHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
    String content = "";
    if (element instanceof HTMLRaw) {
        content = ((HTMLRaw) element).getContent();
    }
    Component cmp = TextFactory.createTextComponentFromString("htmlraw_" + CodeHelper.getRAMUniqueID(), content, null, false, null);
    return new PageRunComponent(cmp);
}
Also used : PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) HTMLRaw(org.olat.modules.forms.model.xml.HTMLRaw) Component(org.olat.core.gui.components.Component) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent)

Example 8 with PageRunComponent

use of org.olat.modules.portfolio.ui.editor.PageRunComponent in project openolat by klemens.

the class TitleHandler method getContent.

@Override
public PageRunElement getContent(UserRequest ureq, WindowControl wControl, PageElement element, PageElementRenderingHints hints) {
    String content = "";
    if (element instanceof Title) {
        content = ((Title) element).getContent();
    }
    Component cmp = TextFactory.createTextComponentFromString("title_" + idGenerator.incrementAndGet(), content, null, false, null);
    return new PageRunComponent(cmp);
}
Also used : PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent) Title(org.olat.modules.forms.model.xml.Title) Component(org.olat.core.gui.components.Component) PageRunComponent(org.olat.modules.portfolio.ui.editor.PageRunComponent)

Aggregations

PageRunComponent (org.olat.modules.portfolio.ui.editor.PageRunComponent)8 Component (org.olat.core.gui.components.Component)4 TextComponent (org.olat.core.gui.components.text.TextComponent)4 HTMLRaw (org.olat.modules.forms.model.xml.HTMLRaw)2 Title (org.olat.modules.forms.model.xml.Title)2 HTMLPart (org.olat.modules.portfolio.model.HTMLPart)2 TitlePart (org.olat.modules.portfolio.model.TitlePart)2