I look at the output of Rich Text in Magnolia directly in the interface. I define the field as shown below:
@TabFactory("Content")
public void contentTab(UiConfig cfg, TabBuilder tab) {
tab.fields(
cfg.fields.text("title").label("Title"),
cfg.fields.richText("subtitle").label("Subtitle")
);
}
Inside a template, when information is stored in the JCR, it appears to encode data with HTML objects:
Title: ${content.title}
Subtitle: ${content.subtitle}
Outputs (source) ...
Title: The Title Field
Subtitle: <p>The Subtitle Field</p>
But should be output (source) ...
Title: The Title Field
Subtitle: <p>The Subtitle Field</p>
Is there a way to automatically encode Rich Text fields?
source
share