References and JSON RTE in Contentstack: Connected, Structured Content

Content is a graph, not a pile of pages

Two features make Contentstack content truly structured: reference fields that connect entries, and the JSON Rich Text Editor that stores rich text as structured data instead of HTML blobs.

Reference Fields

A reference links one entry to others:

  • Blog post → Author
  • Product → Category
  • Page → Related articles

Update the author's bio once, and every post shows the new version.

Fetching References

const query = Stack.ContentType('blog_post').Query()
  .includeReference(['author', 'related_posts'])
  .toJSON();
const [entries] = await query.find();

Only include references you need — each level adds payload and latency.

JSON RTE

Instead of storing HTML, the JSON RTE stores a tree of nodes (paragraphs, headings, lists, links, embedded entries). Benefits:

  • Render to any channel: web, mobile, email, voice
  • Embed entries and assets inline (e.g. a product card in an article)
  • Safer than raw HTML (no arbitrary scripts)

Rendering

Contentstack's utilities convert JSON RTE to HTML, or you can map nodes to your own React components:

import { jsonToHTML } from '@contentstack/utils';
jsonToHTML({ entry, paths: ['body'] });

Modelling Tips

  • Avoid reference chains more than 2–3 levels deep
  • Use references for reusable things, embedded entries for inline components
  • Keep reference fields limited to specific content types

References and JSON RTE turn content into reusable, structured data — the foundation of omnichannel and AI-ready content.

Arivanandhan Chitheshwaran