Rich editor
The rich editor lets the user write formatted text — headings, lists, links, tables, and more. It
stores a structured TipTap document rather than raw HTML, which keeps the stored value safe to render.
Create one with RichEditor::make().
RichEditor::make('article', 'Article') ->placeholder('Write your article…')- columnWidth:"md"
- conditions:null
- dependsOnAny:false
- dependsOnKeys:null
- disabled:false
- editablePrefill:false
- helperText:null
- hidden:false
- label:"Article"
- name:"article"
- placeholder:"Write your article…"
- prefillRefreshOn:null
- prefillResetOn:null
- readOnly:false
- required:false
- tooltip:null
- value:null
Stored value
Section titled “Stored value”The field submits a JSON document. Before it reaches handle(), Lattice decodes and validates it
against the editor’s schema (unknown nodes are stripped), so you receive a clean document array you
can store as-is and render later by wrapping it in RichContent:
use Lattice\Lattice\Forms\RichContent;
$html = RichContent::make($document)->toHtml();toHtml() validates the document against the editor’s schema (unknown nodes are stripped) and
sanitizes the output, so it is safe to render directly. toText() returns a plain-text version.
Placeholder
Section titled “Placeholder”->placeholder() sets the muted hint shown while the editor is empty.
Common options
Section titled “Common options”RichEditor shares label, default value, required, disabled, read-only, and visibility options with
every field — see Fields. For validation and conditional behavior, see
Validation and Conditional fields.