Rich Text type fields are similar to text fields but expect rich text html as their input. They are usually used to store long form rich text with support for bold, italic, different font-sizes and more.
In the graph
Create a Rich Text field by simply creating a new field and marking the input type as Rich Text.
Additional Properties
Property | Description | Possible Values |
---|---|---|
Default Value | The default value for this field when no value is provided. | Any Rich Text |
Required | Whether the value is a required field. Can be set in the Validations section |
Validations
The text field supports validations such as field length validations, email, arbitrary regex etc.
Operate On | Possible Conditions |
---|---|
Value Length | > , >= ,= ,<= ,< , |
Character Length | > , >= ,= ,<= ,< , |
Word Length | > , >= ,= ,<= ,< , |
Multiple validations can be chained together with
AND
operations
See Field Validations for more information on how to add validations.
In the CMS
When you publish a Rich Text field, it's available in the Content Management System as a rich text input. The user can enter rich text with full support for bold, italic, font-sizes, lists and other rich text operations.
Internally we store the rich text as HTML
In the API
In the API the output response for this field is an HTML string
.
Sample GraphQL Request
{
movies {
title
summary # Marked as Rich Text in the graph
}
}
Sample GraphQL Response
{
"data": {
"movies": [
{
"title": "Superman vs. Spiderman",
"summary": "<p>An <strong>excellent movie that doesn't exist!</p>"
}
]
}
}