Skip to content

Remove content-container support (decision PR) - #3009

Open
nperez0111 wants to merge 1 commit into
container-blocks/examples-docsfrom
container-blocks/remove-content-containers
Open

Remove content-container support (decision PR)#3009
nperez0111 wants to merge 1 commit into
container-blocks/examples-docsfrom
container-blocks/remove-content-containers

Conversation

@nperez0111

Copy link
Copy Markdown
Contributor

What this PR is

A decision artifact for the container blocks API, stacked on container-blocks/examples-docs:

  • Merge it → content containers (content: "inline" | "plain" combined with children) are cut from v1. Containers are always content: "none"; an editable title/caption is a string prop rendered as an input (the pattern the callout example and docs already use).
  • Close it → content-container support stays as currently implemented on the base branch.

The diff is the exact price of keeping the feature: everything below exists only to support combining a block's own content with children.

What's removed (34 files, +149 / −2,531)

Schema compilation — a content container compiled to three ProseMirror nodes: the block node plus generated <type>__content (group containerContent) and <type>__children nodes. Deleted: buildContentContainerNode, the generated node names and their name-collision validation, the containerContent group, and the extraNodes plumbing through the spec type and extension manager.

PredicatesisContentContainerNode and the isContainerBlockNode wrapper are gone; every isContainerNode(x) || isContentContainerNode(x) disjunction (containerNav, fixContainer, insertBlocks, conversions) collapses to the pure-container predicate. getContainerChildrenHolder and getContentContainerNodeTypes (which existed to locate the generated nodes) are gone with it.

Behavior — the keyboard branches for Enter-splits-the-content-head-into-a-first-child and Backspace-merges-the-first-child-back-into-it (mergeIntoContainerContent), the fixContainer guard that waited for the content head to empty, the splitBlock/mergeBlocks/updateBlock content-container arms, and the content-container paths in blockToNode / nodeToBlock / fragmentToBlocks.

DOM contract — the [data-content-type] / [data-children-of] sibling-region rendering in the internal HTML serializer and the React node view. data-children-of itself stays: pure containers still use it to scope their round-trip parse rule.

Validationchildren + any content other than "none" is now a schema-creation error with a message pointing at the string-prop pattern, keeping the door open to re-add content containers later without an API change.

Tests & docs — the contentContainers unit/browser/conversion suites and fixture, the content-container cases in the parse/React/insert-placement tests (a new test asserts the inline+children error), and the "Containers with their own content" / two-regions docs sections. The string-prop editable-title pattern is now the documented pattern.

Untouched

Pure containers (content: "none" + children) work exactly as before: callout, the container-table example, and xl-multi-column (columnList/column) need no changes. React contentRef for containers keeps working.

Verification

  • vp run lint / vp run format: clean
  • core unit tests: 838 passed
  • xl-multi-column: 86 passed
  • react: 4 passed
  • all package browser suites (chromium/firefox/webkit): 186 passed
  • node docs/validate-links.mjs: 0 errors

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Aug 25, 2026 2:48pm
blocknote-website Ready Ready Preview Aug 25, 2026 2:48pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2bbfbf42-fcb7-4e76-bdec-d68274d714fd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://TypeCellOS.github.io/BlockNote/pr-preview/pr-3009/

Built to branch gh-pages at 2026-08-25 13:10 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Removes the ability to combine content: "inline" / "plain" with
children on a block config. A "content container" compiled to three
ProseMirror nodes (the block node plus generated <type>__content and
<type>__children nodes); all of that machinery is deleted:

- the three-node compilation path (buildContentContainerNode) and the
  extraNodes plumbing through the spec and extension manager
- the containerContent node group, the generated node names, and the
  isContentContainerNode / isContainerBlockNode predicates, collapsing
  every isContainerNode(x) || isContentContainerNode(x) site onto the
  pure-container predicate
- the content-container branches in keyboard behavior (Enter splits the
  content head into a first child, Backspace merges the first child back
  into it, mergeIntoContainerContent), fixContainer, block/node
  conversions, HTML serializers, and the React node view
- the tests, fixtures, and docs sections that covered them

Combining children with any content other than "none" is now a
schema-creation error, keeping the door open to re-add the combination
later. Pure containers (content: "none" + children - callout, column,
columnList) are unaffected; the string-prop editable-title pattern is
now the documented way to give a container a heading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant