Skip to content

Callout

callout is a block element node that represents emphasized content with a background color and an optional icon.

Usage and Children

  • Its children contain block elements such as paragraphs, headings, checklist items, lists, and blockquotes. Inline content belongs inside those child blocks.
  • A new callout commonly starts with a paragraph. The editor rejects pasted code blocks and tables; a pasted callout's wrapper is removed when inserting it into another callout.

Data Structure

Properties

  • style (required, object): callout style.
  • style.background_color (required, string): CSS background color. The editor-created default is #fef7e0; other CSS color values are supported.
  • callout_icon (optional, string): one of trumpet (📢), bulb (💡), prohibited (🚫), or warning (⚠️). An absent field or an empty string means no icon is shown. Store the icon key, rather than the emoji character.

Example

{
  "id": "callout-id",
  "type": "callout",
  "style": {
    "background_color": "#fef7e0"
  },
  "children": [
    {
      "id": "callout-paragraph-id",
      "type": "paragraph",
      "children": [
        {
          "id": "callout-text-id",
          "text": "Callout content"
        }
      ]
    }
  ]
}