Interface RichTextBuilder


@ProviderType public interface RichTextBuilder
Define rich text handling request using builder pattern.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull RichText
    Build formatted markup and return metadata object containing results.
    @NotNull Collection<org.jdom2.Content>
    Build formatted markup as DOM elements.
    @Nullable String
    Build formatted markup string.
    mediaArgs(@Nullable io.wcm.handler.media.MediaArgs mediaArgs)
    Set media arguments to be applied when resolving inline images.
    textMode(@Nullable TextMode textMode)
    Set in which text mode the raw text should be interpreded.
    urlMode(@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

      @NotNull @NotNull RichTextBuilder textMode(@Nullable @Nullable 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(@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

      @NotNull @NotNull RichTextBuilder urlMode(@Nullable @Nullable 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.