Rich Content (Ricos) Converter Service

Download skill
Copy

This recipe covers how to validate and convert content between Ricos documents (Wix's rich content format) and other formats like HTML, Markdown, and plain text.

Overview

Ricos is Wix's rich content format used across various Wix applications (Blog, Stores, etc.). The Ricos Documents API provides:

  • Validation: Check if a document conforms to the Ricos format
  • Convert to Ricos: Transform HTML, Markdown, or plain text into a Ricos document
  • Convert from Ricos: Transform a Ricos document back to HTML, Markdown, or plain text

Learn more about Rich Content and Ricos document structure.

Required API Endpoints

MethodEndpointDocs
Validate DocumentPOST https://www.wixapis.com/ricos/v1/ricos-document/validateSchema
Convert To RicosPOST https://www.wixapis.com/ricos/v1/ricos-document/convert/to-ricosSchema
Convert From RicosPOST https://www.wixapis.com/ricos/v1/ricos-document/convert/from-ricosSchema

Available Plugins

Plugins determine which content types are recognized when validating or converting. Specify them as uppercase enum values:

Plugin EnumDescription
ACTION_BUTTONCall-to-action buttons
AUDIOAudio content
CODE_BLOCKCode snippets
COLLAPSIBLE_LISTExpandable/collapsible lists
DIVIDERSection dividers
EMOJIEmoji support
FILEFile attachments
FONT_FAMILYFont family selection
GALLERYImage galleries
GIPHYGIF integration
HASHTAGHashtag support
HEADINGHeadings (h1-h6)
HTMLRaw HTML blocks
IMAGEImages
INDENTText indentation
LAYOUTLayout containers
LINE_SPACINGLine spacing control
LINKHyperlinks
LINK_BUTTONLink buttons
LINK_PREVIEWLink previews
MENTIONS@mentions
POLLPolls
SPOILERSpoiler/hidden content
TABLETables
TEXT_COLORText color
TEXT_HIGHLIGHTText highlighting
VERTICAL_EMBEDVertical embeds
VIDEOVideo content

IMPORTANT NOTES:

  • Plugin values must be UPPERCASE enum strings (e.g., "HEADING", not "heading")
  • Content using unsupported plugins will result in validation violations
  • When converting HTML, only elements matching your plugins are converted

Step 1: Validate a Ricos Document

Check if a document conforms to the Ricos format and optionally fix issues.

Endpoint: POST https://www.wixapis.com/ricos/v1/ricos-document/validate (docs)

Request Body:

Copy

Response:

Copy

Step 2: Convert HTML to Ricos

Transform HTML content into Ricos document format.

Endpoint: POST https://www.wixapis.com/ricos/v1/ricos-document/convert/to-ricos (docs)

Request Body:

Copy

Response:

Copy

Step 3: Convert Markdown to Ricos

Uses the same endpoint as HTML conversion, with markdown instead of html.

Request Body:

Copy

Step 4: Convert Plain Text to Ricos

Request Body:

Copy

Step 5: Convert Ricos to HTML / Markdown / Plain Text

Convert a Ricos document back to another format.

Endpoint: POST https://www.wixapis.com/ricos/v1/ricos-document/convert/from-ricos (docs)

Request Body (to HTML):

Copy

Response:

Copy

Target format options: "HTML", "MARKDOWN", "PLAIN_TEXT"

For plain text, you can include optional settings:

Copy

Common Use Cases

Blog Post Content Import

When importing blog content from external sources:

  1. Convert HTML/Markdown to Ricos format using Convert To Ricos
  2. Validate the converted document with fixDocument: true
  3. Use the validated document in the Blog Posts API

Rich Content Validation Before Saving

Before saving rich content:

  1. Validate with fixDocument: true
  2. Use the returned validDocument for saving
  3. Check violations array for any issues

Round-Trip Conversion

Convert between formats for editing workflows:

  1. Convert Ricos to Markdown for a Markdown editor
  2. Convert edited Markdown back to Ricos for storage
  3. See Sample Flows for a detailed example

Gotchas & Troubleshooting

  • Maximum content length: 10,000 characters for HTML, Markdown, or plain text
  • Plugin limits: Maximum 100 plugins per request
  • Plugin name max length: 30 characters
  • If converting HTML with images but IMAGE plugin not specified, images are silently dropped
  • Always validate converted content before using in production
  • The plain text convert/from-ricos response concatenates text without separators between nodes — use includeLinks: true in plainTextOptions if you need link URLs preserved
Did this help?