Skip to content

Commit f5d9ec8

Browse files
committed
docs: correct pre-containers claims and stale version notes in the guides
The custom rendering guide claimed "Portable Text has no concept of block nesting", written before containers existed and now contradicted by the containers concept page one sidebar group away. The true claim was always about lists: a list is a flat run of sibling text blocks carrying `listItem` and `level`, with no wrapper node, and that stays true with containers, which nest blocks through object fields. Restate it as the list-specific fact with a pointer to the containers page. The guides' prerequisite notes had also drifted from the released majors: seven pages claimed `@portabletext/editor` v6.x (current: 7.x) and two claimed `@portabletext/toolbar` v7.x (current: 8.x). Refresh all of them; the `@portabletext/react` v6.x note on the rendering page is still accurate and stays.
1 parent 8241133 commit f5d9ec8

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

apps/docs/src/content/docs/editor/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you already have Portable Text content and want to display it, see [Render Po
2121
:::
2222

2323
:::note[Prerequisites]
24-
This guide covers `@portabletext/editor` **v6.x**, `@portabletext/toolbar` **v7.x**, and `@portabletext/keyboard-shortcuts` **v2.x**. Requires React 18+. Check the [editor changelog](https://github.com/portabletext/editor/releases) for breaking changes.
24+
This guide covers `@portabletext/editor` **v7.x**, `@portabletext/toolbar` **v8.x**, and `@portabletext/keyboard-shortcuts` **v2.x**. Requires React 18+. Check the [editor changelog](https://github.com/portabletext/editor/releases) for breaking changes.
2525
:::
2626

2727
You'll need to:

apps/docs/src/content/docs/editor/guides/behavior-cheat-sheet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {PackageManagers} from 'starlight-package-managers'
1111
Below are some common behavior examples. You can also find a list of core behaviors [on GitHub](https://github.com/portabletext/editor/tree/main/packages/editor/src/behaviors).
1212

1313
:::note[Prerequisites]
14-
These recipes are written for `@portabletext/editor` **v6.x** ([changelog](https://github.com/portabletext/editor/releases)).
14+
These recipes are written for `@portabletext/editor` **v7.x** ([changelog](https://github.com/portabletext/editor/releases)).
1515
:::
1616

1717
To add these to your editor, first import `defineBehavior` as well as the `BehaviorPlugin`.

apps/docs/src/content/docs/editor/guides/create-behavior.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {LinkCard} from '@astrojs/starlight/components'
88
Behaviors add functionality to the Portable Text Editor (PTE) in a declarative way.
99

1010
:::note[Prerequisites]
11-
This guide covers `@portabletext/editor` **v6.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires React 18+.
11+
This guide covers `@portabletext/editor` **v7.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires React 18+.
1212
:::
1313

1414
For a deep dive into behaviors and how they work, check out [Behaviors](/editor/concepts/behavior/).

apps/docs/src/content/docs/editor/guides/custom-blocks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {LinkCard} from '@astrojs/starlight/components'
1010
The Portable Text Editor handles text blocks (paragraphs, headings, lists) by default. To add structured content like images, code blocks, or calls to action, you define custom block types in your schema and tell the editor how to render and insert them.
1111

1212
:::note[Prerequisites]
13-
This guide covers `@portabletext/editor` **v6.x** and `@portabletext/toolbar` **v7.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires React 18+. You should be familiar with the [getting started guide](/editor/getting-started/) and [custom rendering](/editor/guides/custom-rendering/).
13+
This guide covers `@portabletext/editor` **v7.x** and `@portabletext/toolbar` **v8.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires React 18+. You should be familiar with the [getting started guide](/editor/getting-started/) and [custom rendering](/editor/guides/custom-rendering/).
1414
:::
1515

1616
## How custom blocks work

apps/docs/src/content/docs/editor/guides/custom-rendering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar:
88
The Portable Text Editor gives you control of how it renders each schema type element. You need to explicitly tell it what. These choices have no impact on the Portable Text output—they only affect how the editor itself renders content.
99

1010
:::note[Prerequisites]
11-
This guide covers `@portabletext/editor` **v6.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires React 18+.
11+
This guide covers `@portabletext/editor` **v7.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires React 18+.
1212
:::
1313

1414
:::note[Two rendering systems]
@@ -30,7 +30,7 @@ All the different render functions passed to `PortableTextEditable` can be defin
3030

3131
Most follow the same pattern of reading `props` and conditionally rendering elements based on schema data.
3232

33-
Lists are a bit unique. Portable Text has no concept of block nesting, so the solution is to use pure CSS to style them. We suggest [including this example CSS](https://github.com/portabletext/editor/blob/main/examples/basic/src/editor.css) or similar to manage list rendering.
33+
Lists are a bit unique. A list in Portable Text is flat: a run of sibling text blocks carrying `listItem` and `level`, with no wrapper node. ([Containers](/editor/concepts/containers/) nest blocks through object fields, but lists stay flat.) Visual nesting comes from CSS. We suggest [including this example CSS](https://github.com/portabletext/editor/blob/main/examples/basic/src/editor.css) or similar to manage list rendering.
3434

3535
Here are basic implementations of some core types:
3636

apps/docs/src/content/docs/editor/guides/customize-toolbar.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {PackageManagers} from 'starlight-package-managers'
88
The [getting started guide](/editor/getting-started/) introduces the basics of setting up toolbar components. This guide provides some extra context, best practices, and patterns to get you started.
99

1010
:::note[Prerequisites]
11-
This guide covers `@portabletext/toolbar` **v7.x** and `@portabletext/keyboard-shortcuts` **v2.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires `@portabletext/editor` v6.x and React 18+.
11+
This guide covers `@portabletext/toolbar` **v8.x** and `@portabletext/keyboard-shortcuts` **v2.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires `@portabletext/editor` v7.x and React 18+.
1212
:::
1313

1414
## Render the toolbar inside the provider

apps/docs/src/content/docs/editor/guides/testing-behaviors.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Portable Text Editor ships with testing infrastructure you can use for your
1313
Both approaches use Vitest Browser Mode with Playwright, running tests against a real browser.
1414

1515
:::note[Prerequisites]
16-
This guide covers `@portabletext/editor` **v6.x** and `racejar` **v2.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires Vitest with Browser Mode and Playwright.
16+
This guide covers `@portabletext/editor` **v7.x** and `racejar` **v2.x** ([changelog](https://github.com/portabletext/editor/releases)). Requires Vitest with Browser Mode and Playwright.
1717
:::
1818

1919
## Setup

0 commit comments

Comments
 (0)