Package io.wcm.handler.richtext
Interface RichTextBuilder
-
@ProviderType public interface RichTextBuilderDefine rich text handling request using builder pattern.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull RichTextbuild()Build formatted markup and return metadata object containing results.@NotNull Collection<org.jdom2.Content>buildContent()Build formatted markup as DOM elements.@Nullable StringbuildMarkup()Build formatted markup string.@NotNull RichTextBuildermediaArgs(io.wcm.handler.media.MediaArgs mediaArgs)Set media arguments to be applied when resolving inline images.@NotNull RichTextBuildertextMode(TextMode textMode)Set in which text mode the raw text should be interpreded.@NotNull RichTextBuilderurlMode(io.wcm.handler.url.UrlMode urlMode)Set URL mode to be applied for building URLs for inline links and inline images.
-
-
-
Method Detail
-
textMode
@NotNull @NotNull RichTextBuilder textMode(TextMode textMode)
Set in which text mode the raw text should be interpreded.- Parameters:
textMode- Text mode- Returns:
- Rich text builder
-
mediaArgs
@NotNull @NotNull RichTextBuilder mediaArgs(io.wcm.handler.media.MediaArgs mediaArgs)
Set media arguments to be applied when resolving inline images.- Parameters:
mediaArgs- Media arguments- Returns:
- Rich text builder
-
urlMode
@NotNull @NotNull RichTextBuilder urlMode(io.wcm.handler.url.UrlMode urlMode)
Set URL mode to be applied for building URLs for inline links and inline images.- Parameters:
urlMode- URL mode- Returns:
- Rich text builder
-
build
@NotNull @NotNull RichText build()
Build formatted markup and return metadata object containing results.- Returns:
- Rich text metadata. Never null, if the resolving failed the isValid() method returns false.
-
buildMarkup
@Nullable @Nullable String buildMarkup()
Build formatted markup string.- Returns:
- Formatted markup string or null if invalid or empty.
-
buildContent
@NotNull @NotNull Collection<org.jdom2.Content> buildContent()
Build formatted markup as DOM elements.- Returns:
- DOM elements or empty collection if invalid or empty.
-
-