Package io.wcm.handler.richtext
Interface RichTextBuilder
@ProviderType
public interface RichTextBuilder
Define rich text handling request using builder pattern.
-
Method Summary
Modifier and TypeMethodDescription@NotNull RichTextbuild()Build formatted markup and return metadata object containing results.@NotNull Collection<org.jdom2.Content> Build formatted markup as DOM elements.@Nullable StringBuild formatted markup string.@NotNull RichTextBuildermediaArgs(@Nullable io.wcm.handler.media.MediaArgs mediaArgs) Set media arguments to be applied when resolving inline images.@NotNull RichTextBuilderSet in which text mode the raw text should be interpreded.@NotNull RichTextBuilderurlMode(@Nullable io.wcm.handler.url.UrlMode urlMode) Set URL mode to be applied for building URLs for inline links and inline images.
-
Method Details
-
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(@Nullable @Nullable 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
Set URL mode to be applied for building URLs for inline links and inline images.- Parameters:
urlMode- URL mode- Returns:
- Rich text builder
-
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
Build formatted markup string.- Returns:
- Formatted markup string or null if invalid or empty.
-
buildContent
Build formatted markup as DOM elements.- Returns:
- DOM elements or empty collection if invalid or empty.
-