GuidePremium
Text blocks in CoullWorks Blog for Laravel
The heading, text, quote, callout, code and divider blocks: what each is for, how to add it, every field with its limits, how it renders and the stored JSON, with screenshots.
Updated 16 November 2026Back to the package pageBuy
These six blocks carry the words of an article. For how to add, move and delete blocks see the block editor. The editor screenshots show the Edit block dialog that opens from the gear on a block's line; the rendered screenshots are the same block on the Blade front end of the demo blog.
Every block is stored as { "type": "...", "v": 1, "data": { ... } }. Only the data object is shown below. Where a rule says "required" the editor marks the field with a red star, and the server refuses a save that lacks it. Messages not quoted below are the standard Laravel validation messages for the field.
Heading#

The Heading block form. Text and Level are required; Anchor is left empty and made from the text.

The same heading on the page.
What it is for. A section heading inside the article. Headings are not decoration: they feed the Toc block, the contents list in the article rail and the jump links, so use a Heading block (not bold text) for every section.
Add it. Picker group text, entry Heading.
| Field (label) | Type | Required | Default | Allowed values and validation | What it does |
|---|---|---|---|---|---|
Text (text) | Text input | Yes | Empty | Up to 255 characters | The words of the heading. |
Level (level) | Select | Yes | h2 | h2, h3, h4 | The heading level. The page title is the h1, so the first level to use is h2. |
Anchor (anchor) | Text input | No | Empty | Up to 120 characters; lower-case letters and digits in groups joined by single hyphens, for example weather-you-expect | The id that links to the heading. When empty it is made from the text, for example start-with-the-weather-you-expect. Two headings that would get the same anchor get -2, -3 and so on. |
Stored: { "text": "Start with the weather you expect", "level": "h2", "anchor": null }.
Tips. Keep levels in order (an h3 under an h2). The Toc block lists h2 only or h2 and h3; h4 never appears in it. Set an Anchor only when you link to the heading from elsewhere and need the address to stay stable after you reword it.
Common mistakes. Typing capitals, spaces or underscores in Anchor (it must be lower-case with hyphens). Using a Heading block for a short bold line that is not a section.
Text#

The Text block form. The Body is a rich text editor with the full toolbar.

Two paragraphs on the page.
What it is for. Body copy: paragraphs, lists, links, small tables inside the text. It is the block you will use most.
Add it. Picker group text, entry Text.
| Field (label) | Type | Required | Default | Allowed values and validation | What it does |
|---|---|---|---|---|---|
Body (body) | Rich text editor, full toolbar | Yes | Empty | Text; HTML is cleaned on save | The paragraphs. The toolbar offers bold, italic, underline, strikethrough, subscript, superscript, link, two heading sizes, text alignment, bulleted and numbered lists, undo and redo (plus a few more block tools; the screenshot shows the whole bar). |
Stored: { "body": "<p>Most people buy a tent the way they buy a mattress.</p><p>...</p>" }. The HTML is sanitised when the post is saved, so a script or an event attribute pasted into it is dropped.
Tips. Use one Text block for a run of paragraphs. Start a new block when you need a heading, image or other block between them. Headings made inside the rich editor do not feed the contents list; use a Heading block for that.
Common mistakes. Putting section headings in the rich editor (they are missing from the Toc and the rail), and pasting from a word processor with its own fonts and colours, which the cleaner strips.
Quote#

The Quote block form. Quote is a four-row text area; the two citation fields are single lines.

The quotation with its citation, "Tom Okafor".
What it is for. A quotation set apart from the text, with who said it.
Add it. Picker group text, entry Quote.
| Field (label) | Type | Required | Default | Allowed values and validation | What it does |
|---|---|---|---|---|---|
Quote (quote) | Text area | Yes | Empty | Up to 5000 characters, plain text | The quotation. |
Citation (citation) | Text input | No | Empty | Up to 255 characters | Who said it. Shown under the quote after a dash. |
Citation url (citation_url) | Text input | No | Empty | Up to 2048 characters; must start with http:// or https:// | Links the citation to the source. |
Stored: { "quote": "The best tent is the one you are willing to pitch in the rain.", "citation": "Tom Okafor", "citation_url": null }.
Tips. Put the source link in Citation url so readers (and search engines) can check the quotation. Leave the quotation marks out of the Quote field; the block adds the styling.
Common mistakes. A Citation url without https://, which fails validation.
Callout#

The Callout block form with the info variant, a title and a body.

The callout on the page.
What it is for. A boxed note the reader should not miss: a tip, a warning, a side fact. It is drawn as an aside with role="note", so assistive technology announces it as a note.
Add it. Picker group text, entry Callout.
| Field (label) | Type | Required | Default | Allowed values and validation | What it does |
|---|---|---|---|---|---|
Variant (variant) | Select | Yes | None chosen (the render falls back to the info look) | info, tip, warning, note | Sets the colour of the bar at the box's edge. |
Title (title) | Text input | No | Empty | Up to 255 characters | A short heading for the box. |
Body (body) | Rich text editor, full toolbar | Yes | Empty | Text; HTML is cleaned on save | The note itself. |
Stored: { "variant": "info", "title": "What free-standing really means", "body": "<p>...</p>" }.
Tips. Choose the variant for what the note is (warning for something that can go wrong), not for the colour. Keep a callout to a few lines; use a Section for anything longer.
Common mistakes. Leaving Variant unset (it is required), and using several callouts in a row, which stops each from standing out.
Code#

The Code block form for a bash script, with line numbers on and lines 6-8 marked.

The listing on the page. Wrap is off, so the long comment on line 2 scrolls sideways.
What it is for. A listing of code, a command or a config file, with syntax colours.
Add it. Picker group text, entry Code.
| Field (label) | Type | Required | Default | Allowed values and validation | What it does |
|---|---|---|---|---|---|
Language (language) | Select | Yes | plaintext | php, js, ts, jsx, tsx, json, bash, html, css, scss, less, sql, xml, yaml, python, graphql, diff, twig, plaintext | Picks the colours. |
Filename (filename) | Text input | No | Empty | Up to 255 characters | A name shown in a bar above the code. |
Code (code) | Monospace text area, eight rows | Yes | Empty | Up to 200,000 characters | The code, kept exactly as typed. |
Line numbers (line_numbers) | Toggle | No | Off | On or off | Numbers the lines. The numbers are not copied when a reader copies the code. |
Highlight lines (highlight_lines) | Text input | No | Empty | Up to 120 characters, numbers and ranges joined by commas, for example 2-3,5 | Marks those lines. A value such as two or 3- fails validation. |
Wrap (wrap) | Toggle | No | Off | On or off | Wraps long lines instead of scrolling sideways. |
Stored: { "language": "bash", "filename": "route.sh", "code": "#!/usr/bin/env bash\n...", "line_numbers": true, "highlight_lines": "6-8", "wrap": false }.
Tips. The package ships its own small tokenizer (about 13 KB, no network). A post page loads it once, and only when the post has a code block. With JavaScript off the code is plain readable text, and the code area is focusable so a keyboard user can scroll it. Use diff for changes and plaintext for output.
Common mistakes. Pasting code into a Text block (it loses its spacing), and a Highlight lines value that is not numbers and ranges.
Divider#

The Divider block form has one field.

Three dividers among paragraphs, in the order line (a thin grey rule across the column), dots (a row of small dots) and space (an empty gap with no mark).
What it is for. A pause between parts of an article.
Add it. Picker group layout, entry Divider.
| Field (label) | Type | Required | Default | Allowed values and validation | What it does |
|---|---|---|---|---|---|
Style (style) | Select | Yes | line | line, dots, space | line is a thin rule, dots a row of dots, space an empty gap. |
Stored: { "style": "line" }.
Tips. line and dots are drawn as a real separator (hr). space is a spacer hidden from assistive technology, so it announces nothing. Use space for rhythm, not to push content down.
Common mistakes. Using a divider before every heading; headings already separate sections.







