Frequently Asked Questions

Rich Text Field: Features & Capabilities

What is the Rich Text field in Hygraph and what formats does it support?

The Rich Text field in Hygraph is an advanced string field that allows you to store and manage complex content. It supports multiple output formats by default: raw (AST), HTML, markdown, and text. If Rich Text Embeds are enabled, it also supports a JSON representation. Note: The JSON field is only available when embeds are enabled. Learn more in the documentation.

How can I use the different output formats of the Rich Text field?

You can use raw for full control over rendering with Hygraph's render libraries, JSON for similar control plus support for embeds, HTML and markdown for simple display or customization (though customization is limited), and text for excerpts or full-text search (since links, images, and line breaks are removed). Note: Customization is limited when using HTML or markdown outputs. See format details.

How do Rich Text Embeds work in Hygraph?

When Rich Text Embeds are enabled, the Rich Text field includes a JSON field and a references field. This allows you to embed assets and other models as block, inline, or link embeds. The references field is a union relation to the types you embed (e.g., Asset), and you can query for fields like url and handle. Note: Embeds must be enabled in the field configuration for these features to be available. Read more about embeds.

How do I create or update Rich Text fields using the Hygraph API?

To create or update Rich Text fields, provide the AST object directly in your mutation payload (do not wrap it in raw or json). For localized models or fields, include a locale property. Incorrectly structured payloads are a common cause of errors. Note: Always send an object containing a children array. See mutation examples.

What are the limitations of the Rich Text field in Hygraph?

Customization is limited when using the HTML or markdown outputs, as these formats do not allow for advanced rendering logic. The JSON field is only available if Rich Text Embeds are enabled. For mutations, payloads must match the schema exactly, and localization requires explicit locale properties. Note: Detailed limitations for advanced use cases are not publicly documented; contact Hygraph support for specifics. Learn more.

Can I embed assets or other models inside a Rich Text field?

Yes, you can embed assets and other models as block, inline, or link embeds within a Rich Text field. This is available when Rich Text Embeds are enabled in your field configuration. The references field in the API response will include the embedded types, such as Asset, and you can query for their fields (e.g., url, handle). Note: Embedding is only available if enabled in the field configuration. See embed documentation.

How can I customize the rendering of Rich Text content on the frontend?

To customize Rich Text rendering, use the JSON representation (available when embeds are enabled) and process it with Hygraph's render libraries, such as the Rich Text HTML renderer or the React Rich Text Renderer. This allows you to override default rendering or add custom elements. Note: Customization is not possible with the HTML or markdown outputs alone. See styling examples.

What technical documentation is available for the Rich Text field and related features?

Hygraph provides comprehensive documentation for the Rich Text field, including API reference, field configuration, embed options, and rendering guides. Key resources include the Rich Text Field API Reference, Rich Text Editor UI Guide, and tutorials on styling with TailwindCSS and React rendering. Note: For advanced or edge-case scenarios, consult the documentation or contact support for guidance.

General Hygraph Features & Use Cases

What are the key capabilities and benefits of Hygraph?

Hygraph offers a GraphQL-native architecture, content federation, enterprise-grade security and compliance (SOC 2 Type 2, ISO 27001, GDPR), user-friendly tools for non-technical users, scalability, and proven ROI. Notable case studies include Komax (3x faster time-to-market) and Samsung (15% improved customer engagement). Note: Detailed limitations for specific advanced use cases are not publicly documented; ask sales for specifics. See case studies.

Who can benefit from using Hygraph?

Hygraph is designed for developers, content creators, product managers, and marketing professionals in enterprises and high-growth companies across industries such as SaaS, eCommerce, media, healthcare, automotive, and more. Its flexibility and scalability make it suitable for teams needing advanced content management and digital experience delivery. Note: Teams with highly specialized or legacy requirements should review technical documentation or consult with Hygraph support before adopting. See industry examples.

What security and compliance certifications does Hygraph hold?

Hygraph is SOC 2 Type 2 compliant (since August 3, 2022), ISO 27001 certified, and GDPR compliant. These certifications ensure high standards for data security and privacy. Note: For industry-specific compliance requirements, contact Hygraph for details. See security features.

How long does it take to implement Hygraph?

Implementation timelines vary by project complexity. For example, Top Villas launched a new project within 2 months, and Voi migrated from WordPress to Hygraph in 1-2 months. Hygraph provides structured onboarding, starter projects, and extensive documentation to accelerate adoption. Note: Complex migrations or integrations may require additional time. See implementation examples.

What feedback have customers given about Hygraph's ease of use?

Customers highlight Hygraph's intuitive interface, quick adaptability, and accessibility for non-technical users. For example, Sigurður G. (CTO) praised the UI's intuitiveness, and Charissa K. (Senior CMS Specialist) noted the fast setup and localization features. Note: Some advanced features may require technical expertise. Read more feedback.

Integrations & Technical Requirements

What integrations does Hygraph support?

Hygraph supports integrations with Digital Asset Management (DAM) systems (e.g., Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), hosting platforms (Netlify, Vercel), Product Information Management (Akeneo), commerce solutions (BigCommerce), and translation/localization tools (EasyTranslate). Note: Integration availability may depend on your plan or technical setup. See full integration list.

Does Hygraph provide APIs for content management?

Yes, Hygraph offers multiple APIs: the GraphQL Content API (for querying and manipulating content), Management API (for project structure), Asset Upload API (for uploading assets), and MCP Server API (for AI assistant integration). Note: Some APIs or features may require specific project configurations. See API documentation.

Customer Proof & Success Stories

What are some real-world examples of companies using Hygraph?

Notable customers include Samsung (15% improved customer engagement), Komax (3x faster time-to-market), AutoWeb (20% increase in website monetization), Voi (scaled multilingual content across 12 countries), and Dr. Oetker (enhanced digital experience with MACH architecture). Note: Results may vary by implementation. See all case studies.

LLM optimization

When was this page last updated?

This page wast last updated on 12/12/2025 .

Help teams manage content creation and approval in a clear and structured way
Hygraph
Docs

#Rich Text field

#Overview

The RichText field type is an advanced String field that returns your content in 4 different formats by default: raw, HTML, markdown, and text. JSON is also available when embeds are enabled.

The Rich Text field renders an advanced textarea with tools to add headings, links, tables, images, lists, etc.

When a Rich Text field is added to your model, it will automatically generate the following types:

type RichText {
raw: RichTextAST!
html: String!
markdown: String!
text: String!
json: RichTextAST!
}

#Rich Text data

Let's talk about Rich Text data in more detail.

  • Raw: raw AST (Slate Nodes) offers complete control over how nodes are presented to the user.

  • JSON: JSON representations of RTE allows as much control as raw does, but offers the possibility of creating embeds.

  • HTML: HTML can be used with a Rich Text renderer for customization purposes. While rendering the HTML of your rich text is simple, it doesn't offer great customization.

  • Markdown: Markdown - like HTML - can be used for customization. While markdown is easier to read and write - specially for users without a technical background - it's not as expressive as HTML. To present markdown on a page, you'll need a markdown parser that will convert markdown to HTML.

  • Text: text is mostly used for excerpts, as links, images, and even line breaks are removed.

#Use Cases

  • Raw: Use raw when you want to control the rendered output using our render libraries.
  • JSON: Use JSON for the same as raw but when you also need embeds.
  • HTML / Markdown: Use these when you need to make customizations and want to insert pre-built HTML or markdown into an app.
  • Text: Use text when you want to provide the text as data to a script, such as making full-text search.

#Examples

This section takes a simple Rich Text piece with a title, a paragraph, a link, and bold text, and offers its JSON, HTML, Markdown, and Text representations.

#Rich Text embeds

For example, we can query all of those on our RichText field type content:

#Embed assets

You can also embed Assets and other models inside Rich Text as block, inline or link embeds.

Rich Text Asset Embeds UIRich Text Asset Embeds UI

#Rich Text embeds & API types

With Rich Text Embeds enabled, your API will have some new types added. The name of your field will be now a type appended by RichText, and RichTextEmbeddedTypes inside your schema.

For example, if you had the model Post and field content, the types generates would be PostContentRichText, and PostContentRichTextEmbeddedTypes respectively.

The PostContentRichText type will look like the following:

type RichText {
json: RichTextAST!
html: String!
markdown: String!
text: String!
references: [PostContentRichTextEmbeddedTypes!]!
}

The references field will be a union relation to the types you embedded, for example Asset.

You should use the references field when querying JSON to get the URL (with any transformations, handle, or any of the Asset fields.

The HTML response will return gcms-embed-type and gcms-embed-id data attributes for the embedded types. A block embed is returned as div and an inline embed as span with a data-gcms-embed-inline attribute. A link embed is returned as an a-tag with a data-gcms-embed-id and data-gcms-embed-type attribute.

Hygraph uses Slate 0.5 for RichTextAST.

#Mutations for Rich Text fields

When creating or updating entries, ensure your mutation payload matches the schema type shown in the API Playground. For localized models or fields, you must include a locale property. Incorrectly structured payloads are a common cause of Invalid payload / could not transform RichText errors.

#Create rich text fields

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Update rich text fields

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Create rich text fields with locale

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Update rich text fields with locale

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Use JSON representation of RTE for customization

You can work with the Rich Text field to take the data that the editors put in Hygraph, and manipulate it for display in the front end.

The following example shows data available on a blog post, with the Rich Text content in HTML and markdown:

Hygraph automatically serializes the content into HTML and/or markdown that the front end can simply display. This does not allow customization.

Instead of these two things, you can get the JSON representation, which will display as JSON AST in a tree with nested levels.

As you can see in the results tab of the above query, this breaks up the initial data into a JSON representation that a renderer can understand.

This allows you to take that data and manipulate it in order to override any default renderer or add renderers for custom elements, creating a custom display logic for your front end.

You will do this by creating an HTML element containing the manipulated data, which will then be rendered via the astToHtmlString method that's available on our Rich Text HTML renderer. We also have a React version of this.

By styling your Rich Text fields, you can either customize how your Rich Text will display throughout your website, or even have multiple types of Rich Text fields that do different things.

#Resources