Skip to content
  1. Extras
  2. PageBuilder
  3. Field types
  4. Free
  5. richtext

Field richtext

Version: Free.

Why this type

  • Same WYSIWYG as a MODX resource field, no separate TV
  • Links, lists, and basic formatting built in
  • Chunk outputs ready HTML; no block parsing

When to use

  • Main section copy with paragraphs and links
  • FAQ answers with bold text and lists
  • Content where editors should not write markup by hand

Tips

  • Editor.js blocks need editorjs
  • Raw HTML or CSS belongs in ace

Similar types

  • editorjs for structured blocks with json and html
  • textarea for plain text without tags

Schema

json
{
  "name": "content",
  "type": "richtext",
  "label": "Text",
  "tab": "Content",
  "width": 100,
  "active": true
}

Value

HTML string.

Section data

Key content in the section data:

json
{
  "content": "<p>Text with <strong>markup</strong>.</p>"
}

Chunk example

html
<div class="pb-richtext__content">{$content}</div>

Notes

Pro: responsive.

Common properties

For fields with name that are stored in the section data:

KeyTypeRoleCMP
tabstringGroup subtitle in the inspectoryes
width25–100Field width as % of the row (flex)yes
descriptionstringHint under the labelyes
defaultanyInitial value for a new sectionyes
activeboolfalse hides the field in the inspectoryes
requiredboolRequired on publish (draft still saves)yes

Pro (capability responsive): with responsive: true, the section data uses desktop, tablet, mobile keys instead of a scalar.

See fields overview.

See also