Cloudcore

Block Types

Content is built with blocks. Each block has a type, a value, and optional configuration.

Available blocks

TypeLabelDescription
paragraphParagraphPlain text paragraph
headingHeadingH1–H6 with level option
richtextRich TextWYSIWYG editor — bold, italic, links, lists, headings, blockquotes
quoteQuoteBlockquote with optional citation
imageImageSingle image with caption and size options
galleryGalleryMulti-image grid with column options
videoVideoYouTube, Vimeo, or direct video URL
buttonButtonCTA with link, style, and target options
codeCode BlockCode with language option
htmlCustom HTMLRaw HTML content
embedEmbedExternal content embed via URL
spacerSpacerVertical spacing (sm/md/lg/xl)
dividerDividerHorizontal rule

Block structure

{
  "id": "block-123",       // Auto-generated unique ID
  "type": "richtext",      // Block type
  "value": "<p>...</p>", // Main content (HTML for richtext, text for others)
  "options": {},           // Type-specific options
  "mediaId": "01ABC...",   // Optional media reference
  "mediaIds": []           // Optional multi-media references
}

Rendering blocks

Frontends receive blocks as JSON arrays via the API. Each starter template includes a BlockRenderer component that maps block types to React/Astro components. Extend it to add custom block types.

Rich text output

The richtext block stores clean HTML produced by the Tiptap editor. It includes:

  • Paragraphs, headings (H1–H3)
  • Bold, italic, strikethrough, inline code
  • Bullet and numbered lists
  • Blockquotes
  • Links (with rel="noopener noreferrer")
  • Horizontal rules

Render it with dangerouslySetInnerHTML (React) or set:html (Astro). The HTML is sanitized on the server before storage.