Package io.wcm.handler.richtext.ui
Class ResourceRichText
- java.lang.Object
-
- io.wcm.handler.richtext.ui.ResourceRichText
-
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class) public class ResourceRichText extends Object
Generic resource-based model for rendering formatted rich text.Optional use parameters when referencing model from Sightly template:
propertyName: Property name in which the text is stored in the resourceisRichText: Set to false if text to format is plain text.
-
-
Constructor Summary
Constructors Constructor Description ResourceRichText()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMarkup()Returns the formatted text as XHTML markup.booleanisValid()Returns true if rich text is present and valid.
-
-
-
Method Detail
-
isValid
public boolean isValid()
Returns true if rich text is present and valid.- Returns:
- Rich text is valid
-
getMarkup
public String getMarkup()
Returns the formatted text as XHTML markup.- Returns:
- Rich text markup
-
-