Improve content blocks: new types, formatting, and a better editor
Blocks (migration 032): video (click to play, sharing the featured cards' player), button and callout types; quotes get an attribution and images alt text separate from the caption. Paragraphs, callouts, quotes and list items take **bold**, *italic*, [text](url), line breaks and blank-line paragraphs, parsed into elements (never HTML) with only safe link schemes. A list item's detail no longer uses an em-dash. Editor: each block type shows only its fields, with a named type and a description, and every open block previews itself with the site's renderer. Any repeater row can now be duplicated or have a new row inserted below it; nested collections take `when`, and help text can depend on the row. src/seed-showcase.js writes a local test post using every block type and option. It refuses the production database. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c62dc84add
commit
c5f12c769f
13 changed files with 723 additions and 169 deletions
|
|
@ -176,12 +176,17 @@ const blocksChild = (ownerKind) => ({
|
|||
"quote",
|
||||
"image",
|
||||
"divider",
|
||||
"video",
|
||||
"button",
|
||||
"callout",
|
||||
],
|
||||
{ required: true },
|
||||
),
|
||||
text("text"),
|
||||
text("media"),
|
||||
text("href"),
|
||||
text("alt"),
|
||||
text("cite"),
|
||||
],
|
||||
children: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue