Managing Rich Content

Rich Content Format Definition

The root of the JSON object contains the following properties:

  • version: A string indicating the version of the format (e.g., "1.0").
  • blocks: An array of content block objects.

Content Block Structure

Each object within the blocks array represents a content block and contains the following properties:

  • type (string, required): Specifies the type of content block. Must be one of the values from RichContentBlockTypes.
  • data (object, required): Contains the content-specific data for the block.
  • separator (boolean): If true, adds spacing after this block when rendered (default: true).

Block Types and Data Fields

  • heading – A simple text block with a plain text heading.
    • Data fields:
      • heading (string, required): The heading text.
      • mobileHeading (string, optional): A version of the heading text for smaller screens.

  • headingText – A block with a heading and paragraph text. The heading is rendered using the heading block, and the text is plain text.
    • Data fields:
      • heading (string, required): The heading text.
      • text (string, required): The paragraph text.
      • mobileHeading (string, optional): A version of the heading for smaller screens.
      • mobileText (string, optional): A version of the paragraph text for smaller screens.

  • image – A full-width image. The image height is never limited. The width will be constrained only if it exceeds the container’s width.
    • Data fields:
      • url (string, required): Public direct URL to the image file.
      • alt (string): Alternative text for the image.
      • mobileUrl (string, optional): A version of the image for smaller screens.

  • imageText – A combination of image and text. The image can be placed on the left or right side.
    • Data fields:
      • url (string, required): Public direct URL to the image file.
      • alt (string): Alternative text.
      • placement (left | right): Side on which the image is placed. Default: left.
      • heading (string, required): Heading text associated with the image.
      • text (string, required): Paragraph text.
      • mobileHeading (string, optional): Heading text for smaller screens.
      • mobileText (string, optional): Paragraph text for smaller screens.
      • mobileUrl (string, optional): Image URL for smaller screens.

  • imageSlider – A slider containing image blocks with navigation controls.
    • Data fields:
      • slides (object[], required): An array of image block data.

  • imageTextSlider – A slider containing imageText blocks with navigation controls.
    • Data fields:
      • slides (object[], required): An array of imageText block data.

  • faq – A text block containing a heading (question) and answer. It is an alias of the headingText block type.
    • Data fields:
      • question (string, required): The question text.
      • answer (string, required): The answer text.

  • video – A block with a single video that can be played on the page.
    • Data fields:
      • url (string, required): Public direct URL to the video file.
      • alt (string, required): Alternative text for the video.
      • mobileUrl (string, optional): A version of the video for smaller screens.

  • videoText – A combination of video and text.
    • Data fields:
      • url (string, required): Public direct URL to the video file.
      • alt (string): Alternative text.
      • placement (left | right): Side on which the video is placed. Default: left.
      • heading (string, required): Heading text.
      • text (string, required): Paragraph text.
      • mobileHeading (string, optional): Heading text for smaller screens.
      • mobileText (string, optional): Paragraph text for smaller screens.
      • mobileUrl (string, optional): Video URL for smaller screens.