Ricos Document

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Wix Ricos defines its own data structure, the Ricos document. Its a central piece of Ricos technology as the rich content editor and viewer are built around it.

Fundamentally, the object structure is a tree of nodes representing content blocks. It includes basic text container nodes (like paragraphs, headings, lists, and so on), as well as more complex nodes that require Ricos plugins to work. These complex nodes allow for the creation of advanced content blocks (like videos, tables, galleries, and so on).

The Ricos document resembles HTML, with various node types acting like HTML tags and their fields functioning as attributes. The nodes field represents the children of HTML tags. The primary difference, and the reason Ricos does not use HTML as its structure, is that the Ricos document imposes more constraints. This allows it to be more easily manipulated and displayed across different environments.

Important: this document describes the full reference of Ricos document schema. However, when creating rich content with Wix APIs that access a Ricos Document, beware of the plugins that each product supports. A list of supported plugins is described in each API where the Ricos Document is used.

Playground

You can experiment with with rich content directly using the embedded playground we provide. You can experiment in the following way:

  • By editing the Ricos document in the Document section of the playground.
  • By editing content in the Editor section. You will see how the Ricos document is updated to reflect any changes made in the Editor section.

For a more comfortable experience you can try viewing examples in the Full playground.

Reference

RicosDocument
FieldTypeDescription
nodes
Required
Array <RootNode>A collection of predefined individual data elements, such as PARAGRAPH, HEADING, and so on.
metadataMetadataData about the Ricos document, such as version. This property is applicable only when using the ricos content editor and is auto-generated.
documentStyleDocumentStyleDefines styles for nodes. For example, you can define general styling for headerOne, and then override some of the properties separately for a specific header.

Nodes

This section describes all possible nodes in the Ricos Document. Some are unions, such as RootNode.

Here is the list of specific nodes, presented in alphabetical order for quick access: AppEmbedNode, AudioNode, BlockquoteNode, BulletedListNode, ButtonNode, CodeBlockNode, CollapsibleItemNode, CollapsibleItemBodyNode, CollapsibleItemTitleNode, CollapsibleListNode, DividerNode, EmbedNode, FileNode, GalleryNode, GifNode, HeadingNode, HtmlNode, ImageNode, LinkPreviewNode, ListItemNode, OrderedListNode, ParagraphNode, PollNode, TableCellNode, TableNode, TableRowNode, TextNode, VideoNode.

RootNode

Used in: RicosDocument

Represents nodes that can be added to the root level of nodes array.

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
AppEmbedNodeAPP_EMBEDSimilar to LinkPreviewNode, this node is used to embed external content preview, but from Wix business solutions. You can embed previews from the Wix Bookings, Wix Stores and Wix Events apps.
AudioNodeAUDIOA multimedia node used to embed and play audio content directly in a webpage. When rendered, it is displayed as the audio player with the specified audio file (can be a platform such as Spotify or Soundloud, and Wix Media). Users can interact with the controls to play, pause, rewind, and adjust the volume of the audio.
BlockquoteNodeBLOCKQUOTEUsed to visually distinguish quoted or cited content from the surrounding text. When rendered, it is displayed as the quoted text with indentation or other styling to visually separate it from the surrounding content.
BulletedListNodeBULLETED_LISTPresents a group of items in a visually organized manner, where each item is preceded by a bullet point. Bulleted lists are commonly used to present unordered information.
ButtonNodeBUTTONA node that is used to trigger an action when clicked or activated.
CodeBlockNodeCODE_BLOCKUsed to present programming code snippets, markup, or other text-based content that should be displayed exactly as it appears, without any interpretation or formatting applied by the browser. When rendered, it is displayed as the code block with a monospaced font, preserving indentation, line breaks, and spacing as specified in the code.
CollapsibleListNodeCOLLAPSIBLE_LISTA list of items where each item can be expanded or collapsed to reveal or hide additional content associated with it.
DividerNodeDIVIDERA visual node that is used to separate content sections in a page. When rendered, it is displayed as a horizontal line between the paragraphs, acting as a divider between them.
EmbedNodeEMBEDSimilar to HtmlNode, this node is used to display embedded content when you post a link to that resource, without having to parse the resource directly. It provides a standardized way for web developers to include content such as videos, images, and other multimedia elements from supported providers without needing to handle the complex embedding code themselves. For more information, read oembed.
FileNodeFILEA digital file stored on a computer that is uploaded and accessed in a page. Files can include various types of content, such as text documents, images, videos, and so on.
GalleryNodeGALLERYA collection of images displayed together in a visually appealing and organized manner.
GifNodeGIFGIF images are made up of a series of frames, allowing them to display animations or short video clips without the need for additional plugins or technologies.
HeadingNodeHEADINGUsed to denote the heading or title of a section. Headings are hierarchical, with different levels indicating the relative importance of the heading in the content's structure. There are 6 levels of headings, where 1 is the highest level and 6 is the lowest.
HtmlNodeHTMLIncorporates external content, such as interactive maps, or entire web pages.
ImageNodeIMAGEDisplays standalone pictures in a page.
LinkPreviewNodeLINK_PREVIEWA preview or summary of a webpage. Link previews include elements such as the title of the linked page, a brief description or excerpt of the content, and possibly a thumbnail image or other relevant information.
OrderedListNodeORDERED_LISTPresents a group of items in a sequentially numbered or lettered manner. Ordered lists are used to represent information that has a specific order or sequence.
ParagraphNodePARAGRAPHUsed to structure text content, providing a clear separation between different ideas or sections of text. They are rendered with default styling that typically includes some space above and below the paragraph, making it visually distinct from the surrounding content.
PollNodePOLLA node that allows users to vote or express their opinions on a particular question, topic, or issue.
TableNodeTABLEA structural node used to display data in rows and columns.
VideoNodeVIDEOA multimedia node that is used to embed and play video content directly in a page. When rendered, it is displayed as the video player with the specified video file. Users can interact with the controls to play, pause, rewind, and adjust the volume of the video.

ParagraphNode

Used in: RootNode, BlockquoteNode, ListItemChildNode, TableCellChildNode, CollapsibleTitleChildNode, CollapsibleItemBodyChildNode

Used to structure text content, providing a clear separation between different ideas or sections of text. They are rendered with default styling that typically includes some space above and below the paragraph, making it visually distinct from the surrounding content.

Example: Paragraph
FieldTypeDescription
type
Required
"PARAGRAPH"Node type.
Value: PARAGRAPH
nodesArray <TextNode>Paragraph children.
idstring
format NODE_ID
Node ID.
styleNodeStyleParagraphs vertical padding.
Note: This node requires the lineSpacing plugin for styling.
paragraphDataParagraphDataParagraph node attributes.
ParagraphData

Used in: ParagraphNode

FieldTypeDescription
textStyleTextStyleStyling for the paragraph text.
indentationint32
Paragraph margin from the left side. Possible values are from 1 to 4.
Actual indentation is equal to indentation * 40px.

TextNode

Used in: ParagraphNode, HeadingNode, CodeBlockNode

Text nodes hold the text itself (think span tag in HTML). The difference between TextNode and HTML span is that text nodes can't be nested and must contain non-empty string. Their appearance and behavior can be modified using decorations.

Example: Text
FieldTypeDescription
type
Required
"TEXT"Node type.
Value: TEXT
textData
Required
TextDataText options.
idstring
format NODE_ID
Node ID.
TextData

Used in: TextNode

FieldTypeDescription
text
Required
string

minLength: 1
A piece of text, possibly enhanced with additional decorations. Must not be empty.
decorationsArray <Decoration>
Unique Tags
Text decoration options, such as font and text color. Each type of decoration must appear at most once in this array.

HeadingNode

Used in: RootNode, ListItemChildNode, TableCellChildNode, CollapsibleTitleChildNode, CollapsibleItemBodyChildNode

Used to denote the heading or title of a section. Headings are hierarchical, with different levels indicating the relative importance of the heading in the content's structure. There are 6 levels of headings, where 1 is the highest level and 6 is the lowest.

Example: Heading sizes
FieldTypeDescription
type
Required
"HEADING"Node type.
Value: HEADING
nodesArray <TextNode>Child nodes to define the heading text.
idstring
format NODE_ID
Node ID.
styleNodeStyleDefines the heading style, such as padding and background color.
Note: This node requires the lineSpacing plugin for styling.
headingDataHeadingDataHeading options.
HeadingData

Used in: HeadingNode

FieldTypeDescription
levelint32
Heading size from 1 to 6, where 1 is the highest level and 6 is the lowest.
textStyleTextStyleDefines the heading text style, such as text alignment and line height.
indentationint32
Heading margin from the left side. Possible values are from 1 to 4.
The indentation is measured in relative to the font size em units, by the following formula: indentation * 1.5. For example, if indentation is 2, then margin is equal to 3em. Therefore the margin is 3 times the size of the font.

ImageNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Note: This type requires the image plugin.

Displays standalone pictures in a page.

FieldTypeDescription
type
Required
"IMAGE"Node type.
Value: IMAGE
imageData
Required
ImageDataImage options.
idstring
format NODE_ID
Node ID.
ImageData

Used in: ImageNode

FieldTypeDescription
image
Required
MediaImage file details, such as source and dimensions.
containerDataPluginContainerDataStyling for the image container, such as dimensions and alignment.
linkLinkLink details, such as URL, or anchor, if image is also used as a link.
disableExpandboolean
Whether the image expands to the full screen when clicked.
Default: false
altTextstring
An alternate text for an image. Used for improved accessibility and shown when the image can't be displayed.
captionstring
Image title.
disableDownloadboolean
Whether the download image button is disabled.
Default: false

OrderedListNode

Used in: RootNode, ListItemChildNode, TableCellChildNode, CollapsibleItemBodyChildNode

Presents a group of items in a sequentially numbered or lettered manner. Ordered lists are used to represent information that has a specific order or sequence.

Example: Ordered list
FieldTypeDescription
type
Required
"ORDERED_LIST"Node type.
Value: ORDERED_LIST
nodes
Required
Array <ListItemNode>
minItems: 1
List items.
idstring
format NODE_ID
Node ID.
orderedListDataOrderedListDataOrdered list details.
OrderedListData

Used in: OrderedListNode

FieldTypeDescription
indentation
Deprecated
int32
List margin from the left side. Possible values are from 1 to 4.
The indentation is measured in relative to the font size em units, by the following formula: indentation * 1.5. For example, if indentation is 2, then margin is equal to 3em. Therefore the margin is 3 times the size of the font.
offsetint32
An integer (ranging from 0 to 4) used to control the additional indentation level of an ordered or bulleted list node, beyond its original HTML-defined nesting. When offset is 0, the list node appears at its default nesting level; as the value increases from 1 to 4, the node is indented further, creating the visual impression of deeper nesting without altering the actual HTML structure.

BulletedListNode

Used in: RootNode, ListItemChildNode, TableCellChildNode, CollapsibleItemBodyChildNode

Presents a group of items in a visually organized manner, where each item is preceded by a bullet point. Bulleted lists are commonly used to present unordered information.

Example: Bulleted list
FieldTypeDescription
type
Required
"BULLETED_LIST"Node type.
Value: BULLETED_LIST
nodes
Required
Array <ListItemNode>
minItems: 1
List items.
idstring
format NODE_ID
Node ID.
bulletedListDataBulletedListDataBulleted list details.
BulletedListData

Used in: BulletedListNode

FieldTypeDescription
indentation
Deprecated
int32
offsetint32
An integer (ranging from 0 to 4) used to control the additional indentation level of an ordered or bulleted list node, beyond its original HTML-defined nesting. When offset is 0, the list node appears at its default nesting level; as the value increases from 1 to 4, the node is indented further, creating the visual impression of deeper nesting without altering the actual HTML structure.
ListItemNode

Used in: BulletedListNode, OrderedListNode

Items in field nodes must conform to the following pattern:

(PARAGRAPH|HEADING) (PARAGRAPH|BULLETED_LIST|ORDERED_LIST)*

A list item must start with a paragraph or heading, followed by any number of paragraphs, bulleted lists, or ordered lists.

More about patterns

FieldTypeDescription
type
Required
"LIST_ITEM"Node type.
Value: LIST_ITEM
nodes
Required
Array <ListItemChildNode>Child nodes that the list item contains.
Array items must adhere to the pattern described above this table.
idstring
format NODE_ID
Node ID.
ListItemChildNode

Used in: ListItemNode

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
BulletedListNodeBULLETED_LISTPresents a group of items in a visually organized manner, where each item is preceded by a bullet point. Bulleted lists are commonly used to present unordered information.
HeadingNodeHEADINGUsed to denote the heading or title of a section. Headings are hierarchical, with different levels indicating the relative importance of the heading in the content's structure. There are 6 levels of headings, where 1 is the highest level and 6 is the lowest.
OrderedListNodeORDERED_LISTPresents a group of items in a sequentially numbered or lettered manner. Ordered lists are used to represent information that has a specific order or sequence.
ParagraphNodePARAGRAPHUsed to structure text content, providing a clear separation between different ideas or sections of text. They are rendered with default styling that typically includes some space above and below the paragraph, making it visually distinct from the surrounding content.

BlockquoteNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Used to visually distinguish quoted or cited content from the surrounding text. When rendered, it is displayed as the quoted text with indentation or other styling to visually separate it from the surrounding content.

Example: Blockquote
FieldTypeDescription
type
Required
"BLOCKQUOTE"Node type.
Value: BLOCKQUOTE
nodes
Required
Array <ParagraphNode>
minItems: 1
maxItems: 1
Child nodes to define a blockquote paragraph.
idstring
format NODE_ID
Node ID.
blockquoteDataBlockquoteDataBlockquote details.
styleNodeStyleDefines the blockquote style, such as padding and background color.
Note: This node requires the lineSpacing plugin for styling.
BlockquoteData

Used in: BlockquoteNode

FieldTypeDescription
indentationint32
Blockquote margin from the left side. Possible values are from 1 to 4.
The indentation is measured in relative to the font size em units, by the following formula: indentation * 1.5. For example, if indentation is 2, then margin is equal to 3em. Therefore the margin is 3 times the size of the font.

GifNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Note: This type requires the giphy plugin.

GIF images are made up of a series of frames, allowing them to display animations or short video clips without the need for additional plugins or technologies.

Example: GIF
FieldTypeDescription
type
Required
"GIF"Node type.
Value: GIF
gifData
Required
GIFDataGIF details.
idstring
format NODE_ID
Node ID.
GIFData

Used in: GifNode

FieldTypeDescription
containerDataPluginContainerDataStyling for the GIF container, such as dimensions and alignment.
originalGIFSource for the full size GIF.
downsizedGIFSource for the downsized GIF.
heightint32
Height in pixels.
widthint32
Width in pixels.
GIF

Used in: GIFData

FieldTypeDescription
gifstring
format WEB_URL
URL for a file in GIF format.
mp4string
format WEB_URL
URL for a file in MP4 format.
stillstring
format WEB_URL
GIF thumbnail URL.

VideoNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Note: This type requires the video plugin.

A multimedia node that is used to embed and play video content directly in a page. When rendered, it is displayed as the video player with the specified video file. Users can interact with the controls to play, pause, rewind, and adjust the volume of the video.

FieldTypeDescription
type
Required
"VIDEO"Node type.
Value: VIDEO
videoData
Required
VideoDataVideo details.
idstring
format NODE_ID
Node ID.
VideoData

Used in: VideoNode

FieldTypeDescription
video
Required
MediaVideo file details, such as source and dimensions.
containerDataPluginContainerDataStyling for the video container, such as dimensions and alignment.
thumbnailMediaVideo thumbnail details, such as dimensions.
disableDownloadboolean
Whether the video download button is disabled.
Default: false
titlestring
Video title.
optionsPlaybackOptionsPlayback details.
PlaybackOptions

Used in: VideoData

FieldTypeDescription
autoPlayboolean
Whether the media automatically starts playing after opening a page.
playInLoopboolean
Whether the media is looped.
showControlsboolean
Whether to show the media controls.

TableNode

Used in: RootNode

Note: This type requires the table plugin.

A structural node used to display data in rows and columns.

Example: Basic table
FieldTypeDescription
type
Required
"TABLE"Node type.
Value: TABLE
nodes
Required
Array <TableRowNode>
minItems: 1
Child nodes to define table rows.
idstring
format NODE_ID
Node ID.
tableDataTableDataTable details.
TableRowNode

Used in: TableNode

FieldTypeDescription
type
Required
"TABLE_ROW"Node type.
Value: TABLE_ROW
nodes
Required
Array <TableCellNode>
minItems: 1
Child nodes to define table cells.
idstring
format NODE_ID
Node ID.
TableData

Used in: TableNode

FieldTypeDescription
containerDataPluginContainerDataStyling for the table container, such as dimensions and alignment.
dimensionsTableData_DimensionsTable dimensions.
rowHeaderboolean
Whether the table's first row is a heading.
Default: false
columnHeaderboolean
Whether the table's first column is a heading.
Default: false
TableData_Dimensions

Used in: TableData

FieldTypeDescription
colsWidthRatioArray <float64
>
Each column width as related to the width of table.
rowsHeightArray <uint32
>
Height of each row.
colsMinWidthArray <uint32
>
Minimum width of each column.
TableCellNode

Used in: TableRowNode

FieldTypeDescription
type
Required
"TABLE_CELL"Node type.
Value: TABLE_CELL
nodes
Required
Array <TableCellChildNode>
minItems: 1
Child nodes to define cell content.
idstring
format NODE_ID
Node ID.
tableCellDataTableCellDataTable cell details.
TableCellChildNode

Used in: TableCellNode

Table cell content node.

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
AudioNodeAUDIOA multimedia node used to embed and play audio content directly in a webpage. When rendered, it is displayed as the audio player with the specified audio file (can be a platform such as Spotify or Soundloud, and Wix Media). Users can interact with the controls to play, pause, rewind, and adjust the volume of the audio.
BlockquoteNodeBLOCKQUOTEUsed to visually distinguish quoted or cited content from the surrounding text. When rendered, it is displayed as the quoted text with indentation or other styling to visually separate it from the surrounding content.
BulletedListNodeBULLETED_LISTPresents a group of items in a visually organized manner, where each item is preceded by a bullet point. Bulleted lists are commonly used to present unordered information.
CodeBlockNodeCODE_BLOCKUsed to present programming code snippets, markup, or other text-based content that should be displayed exactly as it appears, without any interpretation or formatting applied by the browser. When rendered, it is displayed as the code block with a monospaced font, preserving indentation, line breaks, and spacing as specified in the code.
DividerNodeDIVIDERA visual node that is used to separate content sections in a page. When rendered, it is displayed as a horizontal line between the paragraphs, acting as a divider between them.
FileNodeFILEA digital file stored on a computer that is uploaded and accessed in a page. Files can include various types of content, such as text documents, images, videos, and so on.
GifNodeGIFGIF images are made up of a series of frames, allowing them to display animations or short video clips without the need for additional plugins or technologies.
HeadingNodeHEADINGUsed to denote the heading or title of a section. Headings are hierarchical, with different levels indicating the relative importance of the heading in the content's structure. There are 6 levels of headings, where 1 is the highest level and 6 is the lowest.
ImageNodeIMAGEDisplays standalone pictures in a page.
OrderedListNodeORDERED_LISTPresents a group of items in a sequentially numbered or lettered manner. Ordered lists are used to represent information that has a specific order or sequence.
ParagraphNodePARAGRAPHUsed to structure text content, providing a clear separation between different ideas or sections of text. They are rendered with default styling that typically includes some space above and below the paragraph, making it visually distinct from the surrounding content.
VideoNodeVIDEOA multimedia node that is used to embed and play video content directly in a page. When rendered, it is displayed as the video player with the specified video file. Users can interact with the controls to play, pause, rewind, and adjust the volume of the video.
TableCellData

Used in: TableCellNode

FieldTypeDescription
cellStyleTableCellData_CellStyleStyling for the cell, such as background color and text alignment.
borderColorsTableCellData_BorderColorsCell border colors.
TableCellData_CellStyle

Used in: TableCellData

FieldTypeDescription
verticalAlignmentenum: "TOP", "MIDDLE", "BOTTOM"Vertical alignment for the cell's text. Possible values:
- TOP: Aligns the top padding edge of the cell with the top of the row.
- MIDDLE: Centers the padding box of the cell in the row.
- BOTTOM: Aligns the bottom padding edge of the cell with the bottom of the row.
backgroundColorstring
format COLOR_HEX
Cell background color in a hexadecimal value, for example #4287f5.
TableCellData_BorderColors

Used in: TableCellData

FieldTypeDescription
leftstring
format COLOR_HEX
Left border color in a hexadecimal value.
rightstring
format COLOR_HEX
Right border color in a hexadecimal value.
topstring
format COLOR_HEX
Top border color in a hexadecimal value.
bottomstring
format COLOR_HEX
Bottom border color in a hexadecimal value.

AppEmbedNode

Used in: RootNode, CollapsibleItemBodyChildNode

Note: This type requires the appEmbed plugin.

Similar to LinkPreviewNode, this node is used to embed external content preview, but from Wix business solutions. You can embed previews from the Wix Bookings, Wix Stores and Wix Events apps.

FieldTypeDescription
type
Required
"APP_EMBED"Node type.
Value: APP_EMBED
idstring
format NODE_ID
Node ID.
appEmbedDataAppEmbedDataEmbedded Wix app details.
AppEmbedData

Used in: AppEmbedNode

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
AppEmbedDataBookingBOOKINGWix Bookings app. Embeds a particular booking.
AppEmbedDataEventEVENTWix Events app. Embeds a particular event.
AppEmbedDataProductPRODUCTWix Stores app. Embeds a particular product.
AppEmbedDataProduct

Used in: AppEmbedData

Wix Stores app. Embeds a particular product.

FieldTypeDescription
type
Required
"PRODUCT"Which Wix App to embed. Possible values:
- PRODUCT: Wix Stores app. Embeds a particular product.
- EVENT: Wix Events app. Embeds a particular event.
- BOOKINGS: Wix Bookings app. Embeds a particular booking.
name
Required
string
Embedded content name.
image
Required
MediaEmbedded content thumbnail.
itemIdstring
Embedded content ID.
urlstring
Embedded content URL.
imageSrc
Deprecated
string
Deprecated: Use image instead.
AppEmbedDataEvent

Used in: AppEmbedData

Wix Events app. Embeds a particular event.

FieldTypeDescription
type
Required
"EVENT"
name
Required
string
Embedded content name.
image
Required
MediaEmbedded content thumbnail.
eventData
Required
AppEmbedData_EventDataEmbedded Wix Events app content.
itemIdstring
Embedded content ID.
urlstring
Embedded content URL.
imageSrc
Deprecated
string
Deprecated: Use image instead.
AppEmbedDataBooking

Used in: AppEmbedData

Wix Bookings app. Embeds a particular booking.

FieldTypeDescription
type
Required
"BOOKING"
name
Required
string
Embedded content name.
image
Required
MediaEmbedded content thumbnail.
itemIdstring
Embedded content ID.
urlstring
Embedded content URL.
bookingDataAppEmbedData_BookingDataEmbedded Wix Bookings app content.
imageSrc
Deprecated
string
Deprecated: Use image instead.
AppEmbedData_BookingData

Used in: AppEmbedDataBooking

FieldTypeDescription
durationsstring
Booking duration in minutes.
AppEmbedData_EventData

Used in: AppEmbedDataEvent

FieldTypeDescription
schedulingstring
Event schedule.
locationstring
Event location.

EmbedNode

Used in: RootNode

Note: This type requires the linkPreview plugin.

Similar to HtmlNode, this node is used to display embedded content when you post a link to that resource, without having to parse the resource directly. It provides a standardized way for web developers to include content such as videos, images, and other multimedia elements from supported providers without needing to handle the complex embedding code themselves. For more information, read oembed.

Example: oEmbed
FieldTypeDescription
type
Required
"EMBED"Node type.
Value: EMBED
embedData
Required
EmbedDataoEmbed details.
idstring
format NODE_ID
Node ID.
EmbedData

Used in: EmbedNode

FieldTypeDescription
containerDataPluginContainerDataoEmbed node container styling.
oembedOembedoEmbed details.
srcstring
Original asset source.
Oembed

Used in: EmbedData

FieldTypeDescription
typestring
Resource type. For more information read the oEmbed official website.
widthint32
Width of the resource specified in the url field in pixels.
heightint32
Height of the resource specified in the url field in pixels.
titlestring
A text title, describing the resource.
urlstring
The source URL for the resource.
htmlstring
HTML required to embed a video player. The HTML should have no padding or margins.
authorNamestring
Name of the author or owner of the resource.
authorUrlstring
URL for the author or owner of the resource.
providerNamestring
Name of the resource provider.
providerUrlstring
URL for the resource provider.
thumbnailUrlstring
URL for a thumbnail image for the resource. If this property is defined, thumbnailWidth and thumbnailHeight must also be defined.
thumbnailWidthstring
Width of the resource's thumbnail image. If this property is defined, thumbnailUrl and thumbnailHeight must also be defined.
thumbnailHeightstring
Height of the resource's thumbnail image. If this property is defined, thumbnailUrl and thumbnailWidthmust also be defined.
videoUrlstring
URL for an embedded video.
versionstring
The oEmbed version number. This value must be 1.0.

DividerNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Note: This type requires the divider plugin.

A visual node that is used to separate content sections in a page. When rendered, it is displayed as a horizontal line between the paragraphs, acting as a divider between them.

Example: Divider
FieldTypeDescription
type
Required
"DIVIDER"Node type.
Value: DIVIDER
idstring
format NODE_ID
Node ID.
dividerDataDividerDataDivider details.
DividerData

Used in: DividerNode

FieldTypeDescription
containerDataPluginContainerDataDivider container styling.
lineStyleenum: "SINGLE", "DOUBLE", "DASHED", "DOTTED"Divider line style. Possible values:
- SINGLE
- DOUBLE
- DASHED
- DOTTED
widthenum: "LARGE", "MEDIUM", "SMALL"Divider width. Possible values:
- LARGE
- MEDIUM
- SMALL
alignmentenum: "CENTER", "LEFT", "RIGHT"Divider alignment. Possible values:
- CENTER
- LEFT
- RIGHT

CodeBlockNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Note: This type requires the codeBlock plugin.

Used to present programming code snippets, markup, or other text-based content that should be displayed exactly as it appears, without any interpretation or formatting applied by the browser. When rendered, it is displayed as the code block with a monospaced font, preserving indentation, line breaks, and spacing as specified in the code.

FieldTypeDescription
type
Required
"CODE_BLOCK"Node type.
Value: CODE_BLOCK
nodesArray <TextNode>Child nodes to define a code block text.
idstring
format NODE_ID
Node ID.
codeBlockDataCodeBlockDataCode block details.
styleNodeStyleDefines the blockquote style, such as padding and background color.
Note: This node requires the lineSpacing plugin for styling.
CodeBlockData

Used in: CodeBlockNode

FieldTypeDescription
textStyleTextStyleDefines the text style, such as alignment and line height.

LinkPreviewNode

Used in: RootNode, CollapsibleItemBodyChildNode

Note: This type requires the linkPreview plugin.

A preview or summary of a webpage. Link previews include elements such as the title of the linked page, a brief description or excerpt of the content, and possibly a thumbnail image or other relevant information.

Example: Link preview
FieldTypeDescription
type
Required
"LINK_PREVIEW"Node type.
Value: LINK_PREVIEW
linkPreviewData
Required
LinkPreviewDataLink preview details.
idstring
format NODE_ID
Node ID.
LinkPreviewData

Used in: LinkPreviewNode

FieldTypeDescription
containerDataPluginContainerDataLink preview container styling.
linkLinkLink details.
titlestring
Preview title.
thumbnailUrlstring
Preview thumbnail URL.
descriptionstring
Preview description.
htmlstring
Preview content as HTML.

AudioNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Note: This type requires the audio plugin.

A multimedia node used to embed and play audio content directly in a webpage. When rendered, it is displayed as the audio player with the specified audio file (can be a platform such as Spotify or Soundloud, and Wix Media). Users can interact with the controls to play, pause, rewind, and adjust the volume of the audio.

Example: SoundCloud audio
FieldTypeDescription
type
Required
"AUDIO"Node type.
Value: AUDIO
idstring
format NODE_ID
Node ID.
audioDataAudioDataAudio details.
AudioData

Used in: AudioNode

FieldTypeDescription
containerDataPluginContainerDataAudio node container styling.
audioMediaAudio file details.
disableDownloadboolean
Sets whether the audio download button is disabled.
Default: false
coverImageMediaCover image.
namestring
Track name.
authorNamestring
Author name.
htmlstring
An HTML version of the audio node.

GalleryNode

Used in: RootNode

Note: This type requires the gallery plugin.

A collection of images displayed together in a visually appealing and organized manner.

Example: Gallery
FieldTypeDescription
type
Required
"GALLERY"Node type.
Value: GALLERY
galleryData
Required
GalleryDataGallery node details.
idstring
format NODE_ID
Node ID.
GalleryData

Used in: GalleryNode

FieldTypeDescription
items
Required
Array <GalleryData_Item>
minItems: 1
Gallery items details.
containerDataPluginContainerDataGallery container styling.
optionsGalleryOptionsGallery appearance options.
disableExpandboolean
Whether the expand button is disabled. Default: false
disableDownloadboolean
Whether the download button is disabled. Default: false
GalleryOptions

Used in: GalleryData

FieldTypeDescription
layoutGalleryOptions_LayoutGallery layout.
itemGalleryOptions_ItemStyleStyling for gallery items.
thumbnailsGalleryOptions_ThumbnailsStyling for gallery thumbnail images.
GalleryOptions_Layout

Used in: GalleryOptions

FieldTypeDescription
typeenum: "COLLAGE", "MASONRY", "GRID", "THUMBNAIL", "SLIDER", "SLIDESHOW", "PANORAMA", "COLUMN", "MAGIC", "FULLSIZE"Gallery layout type. Possible values:
- COLLAGE: Presents images in various sizes and positions, creating an artistic or dynamic layout.
- MASONRY: A grid-based design that places items in optimal positions based on available vertical space, creating an arrangement where items of varying heights fit together like bricks in a wall.
- GRID: A layout structure that organizes items into rows and columns, creating a clean, uniform, and visually appealing arrangement of images.
- THUMBNAIL: A smaller, scaled-down version of an image that serves as a preview.
- SLIDER: A component that allows users to browse through a set of images by sliding or swiping through them, typically in a confined viewing area.
- SLIDESHOW: A component that automatically or manually transitions through a set of images in a designated area.
- PANORAMA: Wide-angle or 360-degree image that allows users to view an extended horizontal view of a scene.
- COLUMN: Arrangement of the gallery items in vertical sections.
- MAGIC: Visually stunning, dynamic effects that enhance the user experience.
- FULLSIZE: A layout where each image or item is displayed at its full size, taking up the entire viewport or a significant portion of the screen..
horizontalScrollboolean
Whether the horizontal scroll is enabled. Default: true, unless the type field is set to GRID or COLLAGE.
orientationenum: "ROWS", "COLUMNS"Gallery orientation. Possible values:
- ROWS: Gallery items are arranged horizontally in rows.
- COLUMNS: Gallery items are arranged vertically in columns.
numberOfColumnsint32
The number of columns to display on computer screens.
mobileNumberOfColumnsint32
The number of columns to display on mobile phone screens.
GalleryOptions_ItemStyle

Used in: GalleryOptions

FieldTypeDescription
targetSizeint32
Dimension for each gallery item in pixels (behavaior changes according to a gallery type).
ratiofloat64
Item ratio
cropenum: "FILL", "FIT"Sets how gallery item images are cropped. Possible values:
- FILL: Each item in the gallery is cropped and resized to completely fill its container, ensuring that no empty space is left while maintaining the aspect ratio of the original image.
- FIT: Each item in the gallery is resized to fit entirely in its container without any cropping.
spacingint32
The spacing between gallery items in pixels.
GalleryOptions_Thumbnails

Used in: GalleryOptions

FieldTypeDescription
placementenum: "TOP", "RIGHT", "BOTTOM", "LEFT", "NONE"Thumbnail alignment. Possible values:
- TOP
- RIGHT
- BOTTOM
- LEFT
- NONE
spacingint32
Spacing between thumbnails in pixels.
GalleryData_Item

Used in: GalleryData

Fields image, video are in Required One Of group.

Read more about One Of groups here.

FieldTypeDescription
titlestring
Item title.
altTextstring
Item's alternative text.
image
Required One Of
GalleryData_Item_ImageImage item.
video
Required One Of
GalleryData_Item_VideoVideo item.
GalleryData_Item_Video

Used in: GalleryData_Item

FieldTypeDescription
media
Required
MediaVideo file details.
thumbnailMediaVideo thumbnail file details.
GalleryData_Item_Image

Used in: GalleryData_Item

FieldTypeDescription
media
Required
MediaImage file details.
linkLinkLink details for images that are links.

CollapsibleListNode

Used in: RootNode

Note: This type requires the collapsibleList plugin.

A list of items where each item can be expanded or collapsed to reveal or hide additional content associated with it.

Example: Collapsible List
FieldTypeDescription
type
Required
"COLLAPSIBLE_LIST"Node type.
Value: COLLAPSIBLE_LIST
nodes
Required
Array <CollapsibleItemNode>
minItems: 1
Collapsible list child nodes.
idstring
format NODE_ID
Node ID.
collapsibleListDataCollapsibleListDataCollapsible list details.
CollapsibleListData

Used in: CollapsibleListNode

FieldTypeDescription
containerDataPluginContainerDataCollapsible list container styling.
expandOnlyOneboolean
Whether only one item can be expanded at a time.
Default: false
initialExpandedItemsenum: "FIRST", "ALL", "NONE"Sets which items are automatically expanded after the page loads. Possible values:
- FIRST
- ALL
- NONE
directionenum: "LTR", "RTL"Direction of the text in the list. Possible values:
- LTR: Left to right.
- RTL: Right to left.
isQapageDataboolean
Whether the collapsible item will appear in search results as a FAQ.
CollapsibleItemNode

Used in: CollapsibleListNode

Items in field nodes must conform to the following pattern:

COLLAPSIBLE_ITEM_TITLE COLLAPSIBLE_ITEM_BODY

Must contain title as the first item and body as the second.

More about patterns

FieldTypeDescription
type
Required
"COLLAPSIBLE_ITEM"Node type.
Value: COLLAPSIBLE_ITEM
nodes
Required
Array <CollapsibleItemChildNode>Collapsible list item.
Array items must adhere to the pattern described above this table.
idstring
format NODE_ID
Node ID.
CollapsibleItemChildNode

Used in: CollapsibleItemNode

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
CollapsibleItemBodyNodeCOLLAPSIBLE_ITEM_BODYCollapsible list item body node.
CollapsibleItemTitleNodeCOLLAPSIBLE_ITEM_TITLECollapsible list item title node.
CollapsibleItemTitleNode

Used in: CollapsibleItemChildNode

Collapsible list item title node.

FieldTypeDescription
type
Required
"COLLAPSIBLE_ITEM_TITLE"Node type.
Value: COLLAPSIBLE_ITEM_TITLE
nodes
Required
Array <CollapsibleTitleChildNode>
minItems: 1
maxItems: 1
Collapsible list item title child nodes.
idstring
format NODE_ID
Node ID.
CollapsibleTitleChildNode

Used in: CollapsibleItemTitleNode

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
HeadingNodeHEADINGUsed to denote the heading or title of a section. Headings are hierarchical, with different levels indicating the relative importance of the heading in the content's structure. There are 6 levels of headings, where 1 is the highest level and 6 is the lowest.
ParagraphNodePARAGRAPHUsed to structure text content, providing a clear separation between different ideas or sections of text. They are rendered with default styling that typically includes some space above and below the paragraph, making it visually distinct from the surrounding content.
CollapsibleItemBodyNode

Used in: CollapsibleItemChildNode

Collapsible list item body node.

FieldTypeDescription
type
Required
"COLLAPSIBLE_ITEM_BODY"Node type.
Value: COLLAPSIBLE_ITEM_BODY
nodes
Required
Array <CollapsibleItemBodyChildNode>
minItems: 1
Collapsible list item body child nodes.
idstring
format NODE_ID
Node ID.
CollapsibleItemBodyChildNode

Used in: CollapsibleItemBodyNode

Collapsible list item body node.

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
AppEmbedNodeAPP_EMBEDSimilar to LinkPreviewNode, this node is used to embed external content preview, but from Wix business solutions. You can embed previews from the Wix Bookings, Wix Stores and Wix Events apps.
AudioNodeAUDIOA multimedia node used to embed and play audio content directly in a webpage. When rendered, it is displayed as the audio player with the specified audio file (can be a platform such as Spotify or Soundloud, and Wix Media). Users can interact with the controls to play, pause, rewind, and adjust the volume of the audio.
BlockquoteNodeBLOCKQUOTEUsed to visually distinguish quoted or cited content from the surrounding text. When rendered, it is displayed as the quoted text with indentation or other styling to visually separate it from the surrounding content.
BulletedListNodeBULLETED_LISTPresents a group of items in a visually organized manner, where each item is preceded by a bullet point. Bulleted lists are commonly used to present unordered information.
CodeBlockNodeCODE_BLOCKUsed to present programming code snippets, markup, or other text-based content that should be displayed exactly as it appears, without any interpretation or formatting applied by the browser. When rendered, it is displayed as the code block with a monospaced font, preserving indentation, line breaks, and spacing as specified in the code.
DividerNodeDIVIDERA visual node that is used to separate content sections in a page. When rendered, it is displayed as a horizontal line between the paragraphs, acting as a divider between them.
FileNodeFILEA digital file stored on a computer that is uploaded and accessed in a page. Files can include various types of content, such as text documents, images, videos, and so on.
GifNodeGIFGIF images are made up of a series of frames, allowing them to display animations or short video clips without the need for additional plugins or technologies.
HeadingNodeHEADINGUsed to denote the heading or title of a section. Headings are hierarchical, with different levels indicating the relative importance of the heading in the content's structure. There are 6 levels of headings, where 1 is the highest level and 6 is the lowest.
ImageNodeIMAGEDisplays standalone pictures in a page.
LinkPreviewNodeLINK_PREVIEWA preview or summary of a webpage. Link previews include elements such as the title of the linked page, a brief description or excerpt of the content, and possibly a thumbnail image or other relevant information.
OrderedListNodeORDERED_LISTPresents a group of items in a sequentially numbered or lettered manner. Ordered lists are used to represent information that has a specific order or sequence.
ParagraphNodePARAGRAPHUsed to structure text content, providing a clear separation between different ideas or sections of text. They are rendered with default styling that typically includes some space above and below the paragraph, making it visually distinct from the surrounding content.
VideoNodeVIDEOA multimedia node that is used to embed and play video content directly in a page. When rendered, it is displayed as the video player with the specified video file. Users can interact with the controls to play, pause, rewind, and adjust the volume of the video.

FileNode

Used in: RootNode, TableCellChildNode, CollapsibleItemBodyChildNode

Note: This type requires the file plugin.

A digital file stored on a computer that is uploaded and accessed in a page. Files can include various types of content, such as text documents, images, videos, and so on.

FieldTypeDescription
type
Required
"FILE"Node type.
Value: FILE
fileData
Required
FileDataFile details.
idstring
format NODE_ID
Node ID.
FileData

Used in: FileNode

FieldTypeDescription
containerDataPluginContainerDataFile container styling.
srcFileSourceFile data source.
namestring
File name.
typestring
File type.
size
Deprecated
uint32
Deprecated. Replaced by sizeInKb
sizeInKbstring
File size in KB.
pdfSettingsFileData_PDFSettingsSettings for PDF files.
mimeTypestring
File MIME type.
pathstring
File path.
FileData_PDFSettings

Used in: FileData

FieldTypeDescription
viewModeenum: "NONE", "FULL", "MINI"PDF view mode. Possible values:
- NONE: The PDF isn't displayed.
- FULL: A full PDF page view is displayed.
- MINI: A mini view of the PDF is displayed.
disableDownloadboolean
Whether the PDF download button is disabled.
Default: false
disablePrintboolean
Whether the PDF print button is disabled.
Default: false

ButtonNode

Used in: RootNode

Note: This type requires the actionButton, linkButton plugin.

A node that is used to trigger an action when clicked or activated.

FieldTypeDescription
type
Required
"BUTTON"Node type.
Value: BUTTON
buttonData
Required
ButtonDataButton details.
idstring
format NODE_ID
Node ID.
ButtonData

Used in: ButtonNode

FieldTypeDescription
type
Required
enum: "LINK", "ACTION"Button type. Possible values:
- LINK: When clicked, a user is redirected.
- ACTION: When clicked, performs an action.
text
Required
string
Button text.
containerDataPluginContainerDataButton container styling.
stylesButtonData_StylesButton styling.
linkLinkButton link details.
ButtonData_Styles

Used in: ButtonData

FieldTypeDescription
borderButtonData_Styles_BorderBorder properties.
colorsButtonData_Styles_ColorsColor properties.
ButtonData_Styles_Colors

Used in: ButtonData_Styles

FieldTypeDescription
textstring
The text color in a hexadecimal value.
borderstring
The border color in a hexadecimal value.
backgroundstring
The background color in a hexadecimal value.
ButtonData_Styles_Border

Used in: ButtonData_Styles

FieldTypeDescription
widthint32
Border width in pixels.
radiusint32
Border radius in pixels.

PollNode

Used in: RootNode

Note: This type requires the poll plugin.

A node that allows users to vote or express their opinions on a particular question, topic, or issue.

Example: Poll
FieldTypeDescription
type
Required
"POLL"Node type.
Value: POLL
pollData
Required
PollDataPoll details.
idstring
format NODE_ID
Node ID.
PollData

Used in: PollNode

FieldTypeDescription
containerDataPluginContainerDataPoll container styling.
pollPollData_PollPoll data.
layoutPollData_LayoutPoll layout settings.
designPollData_DesignPoll design.
PollData_Poll

Used in: PollData

FieldTypeDescription
idstring
format NODE_ID
Node ID.
titlestring
Poll title.
creatorIdstring
Poll creator ID.
imageMediaMain poll image.
optionsArray <PollData_Poll_Option>Poll details.
settingsPollData_Poll_SettingsPoll display settings.
PollData_Poll_Option

Used in: PollData_Poll

FieldTypeDescription
idstring
Poll option ID.
titlestring
Poll option title
imageMediaImage displayed with the option.
PollData_Poll_Settings

Used in: PollData_Poll

FieldTypeDescription
permissionsPollData_Poll_Settings_PermissionsPermission settings for voting.
showVotersboolean
Whether to display the voters in the vote results.
Default: true.
showVotesCountboolean
Whether to display the vote count.
Default: true.
PollData_Poll_Settings_Permissions

Used in: PollData_Poll_Settings

FieldTypeDescription
viewenum: "CREATOR", "VOTERS", "EVERYONE"Who can view the poll results. Possible values:
- CREATOR: Only poll creator can see the results.
- VOTERS: Only voters can see the results.
- EVERYONE: Anyone who visits the site can see the results.
voteenum: "SITE_MEMBERS", "ALL"Who can vote. Possble values:
- SITE_MEMBERS: Only site members can vote.
- ALL: All site visitors can vote.
allowMultipleVotesboolean
Whether one site visitor can vote multiple times.
Default: false
PollData_Layout

Used in: PollData

FieldTypeDescription
pollPollData_Layout_PollLayoutPoll layout settings.
optionsPollData_Layout_OptionLayoutPoll options layout settings.
PollData_Layout_PollLayout

Used in: PollData_Layout

FieldTypeDescription
typeenum: "LIST", "GRID"Voting options layout. Possible values:
- LIST: Options are displayed as a list.
- GRID: Options are displayed in a grid..
directionenum: "LTR", "RTL"Direction of the text in the poll. Possible values:
- LTR: Left to right.
- RTL: Right to left.
enableImageboolean
Whether to display the main poll image.
Default: false
PollData_Layout_OptionLayout

Used in: PollData_Layout

FieldTypeDescription
enableImageboolean
Whether to display option images.
Defaults: false.
PollData_Design

Used in: PollData

FieldTypeDescription
pollPollData_Design_PollDesignPoll styling.
optionsPollData_Design_OptionDesignVoting options styling.
PollData_Design_PollDesign

Used in: PollData_Design

FieldTypeDescription
backgroundPollData_Design_PollDesign_BackgroundPoll background styling.
borderRadiusint32
Border radius in pixels.
PollData_Design_PollDesign_Background

Used in: PollData_Design_PollDesign

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
PollData_Background_ColorVariantCOLOR
PollData_Background_GradientVariantGRADIENT
PollData_Background_ImageVariantIMAGE
PollData_Background_ColorVariant

Used in: PollData_Design_PollDesign_Background

FieldTypeDescription
type
Required
"COLOR"
colorstring
format COLOR_HEX
The background color in a hexademical value.
PollData_Background_ImageVariant

Used in: PollData_Design_PollDesign_Background

FieldTypeDescription
type
Required
"IMAGE"
imageMediaImage to use for the background.
PollData_Background_GradientVariant

Used in: PollData_Design_PollDesign_Background

FieldTypeDescription
type
Required
"GRADIENT"
gradientPollData_Design_PollDesign_Background_GradientGradient background details.
PollData_Design_PollDesign_Background_Gradient

Used in: PollData_Background_GradientVariant

FieldTypeDescription
angleint32
Gradient angle in degrees.
startColorstring
format COLOR_HEX
Start color as a hexadecimal value.
lastColorstring
format COLOR_HEX
end color as a hexadecimal value.
PollData_Design_OptionDesign

Used in: PollData_Design

FieldTypeDescription
borderRadiusint32
Border radius in pixels.

HtmlNode

Used in: RootNode

Note: This type requires the html plugin.

Incorporates external content, such as interactive maps, or entire web pages.

FieldTypeDescription
type
Required
"HTML"Node type.
Value: HTML
htmlData
Required
HTMLDataHTML details.
idstring
format NODE_ID
Node ID.
HTMLData

Used in: HtmlNode

Fields url, html are in One Of group.

Read more about One Of groups here.

FieldTypeDescription
containerDataPluginContainerDataHTML node container styling.
sourceenum: "HTML", "ADSENSE"HTML code type. Possible values:
- HTML: HTML code.
- ADSENSE: A service provided by Google for serving advertisements on web pages.
url
One Of
string
HTML code URL.
html
One Of
string
HTML code.

Decorations

This section lists what type of styling you can apply for Text Nodes. You can apply several styles at once, but one type of decoration should not be applied more than once.

Decoration

Used in: TextNodeStyle, TextData

This type is Tagged Union with type field being the discriminating tag.

VariantTag valueDescription
AnchorDecorationANCHORClickable text in a hyperlink. Rendered in a different color, indicating that it is a link that users can click to navigate to section in the same page.
BoldDecorationBOLDText that is styled to appear thicker and more prominent than normal text.
ColorDecorationCOLORText that is styled using background and text colors.
Note: This decoration requires the colorDecoration plugin.
FontSizeDecorationFONT_SIZEText font size.
ItalicDecorationITALICText that is styled to appear slanted or italicized, which is typically used for emphasis, citations, or to distinguish certain types of content.
LinkDecorationLINKClickable text in a hyperlink. This text is what users see and click on to navigate to another web page or another resource.
Note: This decoration requires the link plugin.
MentionDecorationMENTIONA piece of text that mentions a specific user, often in social media platforms, forums, or content management systems.
Note: This decoration requires the mention plugin.
SpoilerDecorationSPOILERText that is styled to appear blurred.
Note: This decoration requires the spoiler plugin.
UnderlineDecorationUNDERLINEText that is styled with a line underneath it.

BoldDecoration

Used in: Decoration

Text that is styled to appear thicker and more prominent than normal text.

Example: Bold decoration
FieldTypeDescription
type
Required
"BOLD"Decoration type.
Value: BOLD
fontWeightValuefloat32
Font weight. Values are from 100 to 900.

ItalicDecoration

Used in: Decoration

Text that is styled to appear slanted or italicized, which is typically used for emphasis, citations, or to distinguish certain types of content.

FieldTypeDescription
type
Required
"ITALIC"Decoration type.
Value: ITALIC
italicDataboolean
Whether to enable the italic text.

UnderlineDecoration

Used in: Decoration

Text that is styled with a line underneath it.

FieldTypeDescription
type
Required
"UNDERLINE"Decoration type.
Value: UNDERLINE
underlineDataboolean
Whether to enable the underlined text.

SpoilerDecoration

Used in: Decoration

Note: This type requires the spoiler plugin.

Text that is styled to appear blurred.
Note: This decoration requires the spoiler plugin.

FieldTypeDescription
type
Required
"SPOILER"Decoration type.
Value: SPOILER
spoilerDataSpoilerDataSpoiler details.
SpoilerData

Used in: SpoilerDecoration

FieldTypeDescription
idstring
format NODE_ID
Node ID.

AnchorDecoration

Used in: Decoration

Clickable text in a hyperlink. Rendered in a different color, indicating that it is a link that users can click to navigate to section in the same page.

FieldTypeDescription
type
Required
"ANCHOR"Decoration type.
Value: ANCHOR
anchorDataAnchorDataAnchor details.
AnchorData

Used in: AnchorDecoration

FieldTypeDescription
anchorstring
Target Node ID, where the user is redirected after clicking the anchor.

MentionDecoration

Used in: Decoration

Note: This type requires the mention plugin.

A piece of text that mentions a specific user, often in social media platforms, forums, or content management systems.
Note: This decoration requires the mention plugin.

FieldTypeDescription
type
Required
"MENTION"Decoration type.
Value: MENTION
mentionDataMentionDataAnchor details.
MentionData

Used in: MentionDecoration

FieldTypeDescription
namestring
The display name of the mentioned user.
slugstring
The username of the mentioned user, appearing after the "@" character.
idstring
ID of the mentioned user.

LinkDecoration

Used in: Decoration

Note: This type requires the link plugin.

Clickable text in a hyperlink. This text is what users see and click on to navigate to another web page or another resource.
Note: This decoration requires the link plugin.

Example: Link decoration
FieldTypeDescription
type
Required
"LINK"Decoration type.
Value: LINK
linkDataLinkDataLink details.
LinkData

Used in: LinkDecoration

FieldTypeDescription
linkLinkLink object.

ColorDecoration

Used in: Decoration

Note: This type requires the textColor, textHighlight plugin.

Text that is styled using background and text colors.
Note: This decoration requires the colorDecoration plugin.

Example: Color decoration
FieldTypeDescription
type
Required
"COLOR"Decoration type.
Value: COLOR
colorDataColorDataColor details.
ColorData

Used in: ColorDecoration

FieldTypeDescription
backgroundstring
Background color in a hexadecimal value.
foregroundstring
Text color in a hexadecimal value.

FontSizeDecoration

Used in: Decoration

Text font size.

FieldTypeDescription
type
Required
"FONT_SIZE"Decoration type.
Value: FONT_SIZE
fontSizeDataFontSizeDataFont size details.
FontSizeData

Used in: FontSizeDecoration

FieldTypeDescription
unitenum: "PX", "EM"Font size units. Possible values:
- PX: Size in pixels.
- EM: Relative to the font size of the element (2em means 2 times the size of the current font)
valuefloat32
Font size value.

Metadata

Metadata is used to tell the information about the Ricos document itself, like a version. Can be skipped.

Metadata

Used in: RicosDocument

FieldTypeDescription
versionuint32
Ricos document version.
id
Deprecated
any
createdTimestamp
Deprecated
any
updatedTimestamp
Deprecated
any

Document Styles

DocumentStyle

Used in: RicosDocument

This object sets a default styling for a type of node throughout the entire Ricos Document. For example, we can set the text color for all Heading 1 nodes. You can override the styling of Text nodes separately using Decorations.

FieldTypeDescription
headerOneTextNodeStyleStyle for the H1 nodes.
headerTwoTextNodeStyleStyle for the H2 nodes.
headerThreeTextNodeStyleStyle for the H3 nodes.
headerFourTextNodeStyleStyle for the H4 nodes.
headerFiveTextNodeStyleStyle for the H5 nodes.
headerSixTextNodeStyleStyle for the H6 nodes.
paragraphTextNodeStyleStyle for the paragraph nodes.
blockquoteTextNodeStyleStyle for the block quote nodes.
codeBlockTextNodeStyleStyle for the codeblock nodes.
TextNodeStyle

Used in: DocumentStyle

FieldTypeDescription
decorationsArray <Decoration>Decorations for text nodes.
nodeStyleNodeStyleNode style, such as padding.
Note: This node requires the lineSpacing plugin.
lineHeightstring
Text line height.

Common Types

Types listed in this section are commonly used in other types.

ContainerData

This object defines the layout of node container that is used by videos, galleries, HTML, images, polls, and so on.

PluginContainerData

Used in: VideoData, DividerData, FileData, GalleryData, GIFData, HTMLData, ImageData, LinkPreviewData, PollData, ButtonData, CollapsibleListData, TableData, EmbedData, AudioData

FieldTypeDescription
widthPluginContainerData_WidthNode width in a container when it's displayed.
alignmentenum: "CENTER", "LEFT", "RIGHT"Node alignment in its container. Possible values:
- CENTER
- LEFT
- RIGHT
spoilerPluginContainerData_SpoilerSpoiler cover settings.
heightPluginContainerData_HeightNode height in a container when it's displayed.
textWrapboolean
Whether the text should wrap around the node when it's displayed. If textWrap is false, the node takes up the width of its container.
Default: true for all node types except DIVIDER.
PluginContainerData_Spoiler

Used in: PluginContainerData

FieldTypeDescription
enabledboolean
Whether the spoiler cover is enabled.
Default: false
descriptionstring
Description displayed on top of the spoiler cover.
buttonTextstring
Text of a button that removes the spoiler cover.
PluginContainerData_Width

Used in: PluginContainerData

The width of the node when it's displayed.

Fields size, custom are in One Of group.

Read more about One Of groups here.

FieldTypeDescription
size
One Of
enum: "CONTENT", "SMALL", "ORIGINAL", "FULL_WIDTH"Width size of a node in a container. Possible values:
- CONTENT: The width of the container matches the content width.
- SMALL: A small width.
- ORIGINAL: The width of the container matches the original image width. Note: This value is applicable for imageData containers only.
FULL_WIDTH: The image container takes up the full width of the screen. Note: This value is applicable for imageData containers only.
custom
One Of
string
A custom width value in pixels.
PluginContainerData_Height

Used in: PluginContainerData

FieldTypeDescription
customstring
A custom height value in pixels.

NodeStyle

Used in: TextNodeStyle, ParagraphNode, HeadingNode, BlockquoteNode, CodeBlockNode

Note: This type requires the lineSpacing plugin.

FieldTypeDescription
paddingTopstring
The top padding value in pixels.
paddingBottomstring
The bottom padding value in pixels.
backgroundColor
Deprecated
string

TextStyle

Used in: ParagraphData, HeadingData, CodeBlockData

FieldTypeDescription
textAlignmentenum: "AUTO", "LEFT", "RIGHT", "CENTER", "JUSTIFY"Text alignment. Possible values:
- AUTO: Text alligns itself automatically.
- LEFT: Text is aligned to the left.
- RIGHT: Text is aligned to the right.
- CENTER: Text is centered.
- JUSTIFY: Text is justified to both margins. Default: AUTO.
lineHeightstring
Vertical spacing between lines of text in an element.

Used in: ImageData, LinkPreviewData, ButtonData, LinkData, GalleryData_Item_Image

Link object.

Fields url, anchor are in Required One Of group.

Read more about One Of groups here.

FieldTypeDescription
url
Required One Of
string
Absolute URL for the linked document.
anchor
Required One Of
string
Target Node ID, where the user is redirected after clicking the anchor.
targetenum: "SELF", "BLANK", "PARENT", "TOP"The HTML target attribute value for the link. This property defines where the linked document opens. Possible values:
SELF - Default. Opens the linked document in the same frame as the link.
BLANK - Opens the linked document in a new browser tab or window.
PARENT - Opens the linked document in the link's parent frame.
TOP - Opens the linked document in the full body of the link's browser tab or window.
relLink_RelThis object specifies the relationship between the current document and the linked document.

Used in: Link

FieldTypeDescription
nofollowboolean
Indicates to search engine crawlers not to follow the link.
Default: false
sponsoredboolean
Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement.
Default: false
ugcboolean
Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page author.
Default: false
noreferrerboolean
Indicates that this link protects referral information from being passed to the target website.

FileSource

Used in: FileData, Media

File source object.

Fields url, id are in Required One Of group.

Read more about One Of groups here.

FieldTypeDescription
url
Required One Of
string
Absolute URL for the file's source.
id
Required One Of
string
ID that's resolved to a URL by a resolver function.
privateboolean
Indicates whether the file's source is private.
Default: false

Media

Used in: VideoData, ImageData, AudioData, PollData_Poll, AppEmbedDataProduct, AppEmbedDataEvent, AppEmbedDataBooking, GalleryData_Item_Image, GalleryData_Item_Video, PollData_Poll_Option, PollData_Background_ImageVariant

FieldTypeDescription
src
Required
FileSourceMedia data source.
widthint32
Media width in pixels.
heightint32
Media height in pixels.
durationfloat64
Media duration in seconds. Only relevant for audio and video files.

Explanations

Node Ids

Each node ID should be a unique string in the document. These IDs are used primarily to identify nodes for anchor behavior, and sometimes as HTML IDs to execute rendering.

The node ID is mainly used for anchor behavior, as illustrated in the AnchorDecoration example. The editor automatically generates the ID. If you are creating the Ricos Document via an API, you must manually add this ID if necessary.

Plugins

This article describes the full reference of Ricos Document schema. However, some parts of the Ricos document are operational only when the corresponding plugins in the API are enabled. For example ImageNode can be used only when the image plugin is enabled. A complete list of supported plugins is available in the field descriptions of each API that supports the Ricos Document type.

Full list of plugins which have effect on Ricos Document: actionButton, audio, codeBlock, collapsibleList, divider, file, gallery, giphy, html, image, lineSpacing, linkButton, linkPreview, link, mention, poll, spoiler, table, textColor, textHighlight, appEmbed, video,

Tagged unions

Tagged unions are fundamental to the Ricos Document. They accommodate various nodes with different shapes that can occupy the same space. At the root level, there can be more than 10 different nodes. How do we unambiguously determine which node is which? Tagged unions facilitate this by incorporating a common field present in every node’s object. In the Ricos Document, this field is named type but may also be referred to as ‘tag.’ Each node (or decoration) contains this same field, yet each possesses a distinct string value in it. This differentiation allows for easy identification of each node, despite them occupying the “same space.”

Learn more about them on Wikipedia

Formats

FormatDescription
WEB_URLA URL that starts with http:// or https://.
COLOR_HEXA color in hexadecimal RGB or RGBA format, such as #FF0000 or #FF000050. Accepts shorthands like #F00 and #F005
NODE_IDA unique identifier for a node. It must start with a letter and can contain only letters, numbers, hyphens, and underscores.

Validations

ValidationDescription
minItemsMinimum number of items in array
maxItemsMaximum number of items in array
minLengthMinimum length of string
maxLengthMaximum length of string
uniqueTagsThe items in array must have unique union tags on them

Patterns

Most node children are arrays, which can contain zero or more of the specified nodes in any order. However, there are exceptions like ListItemNode and CollapsibleItem, which have specific restrictions on how these arrays can be structured. For example, a CollapsibleItem must contain one CollapsibleItemTitleNode and one CollapsibleItemBodyNode. A (ListItemNode)[#listitemnode) must have a (ParagraphNode)[#paragraphnode] or (HeadingNode)[#headingnode) as the first child, followed by any number of paragraphs, headings, or lists. The strict pattern description uses syntax similar to regular expressions:

  • * indicates any number of items
  • + indicates one or more items
  • () parentheses are used for groups and enclose item tags that can be used interchangeably.

For specific pattern descriptions, refer to the properties table containing the patterned field above.

One Of

Fields in the One Of groups have a constraint that only one of them can be set at the same time.

The variation Required One Of adds another constraint: one (and still at most one) of the fields must be set.

Did this help?