Skip to content

Conversation

@christianhg
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

⚠️ No Changeset found

Latest commit: 5a3a7a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Dec 5, 2025

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

Project Deployment Preview Comments Updated (UTC)
portable-text-editor-documentation Error Error Dec 12, 2025 6:18pm
portable-text-example-basic Error Error Dec 12, 2025 6:18pm
portable-text-example-legacy Error Error Dec 12, 2025 6:18pm
portable-text-playground Error Error Dec 12, 2025 6:18pm


## Open Questions

- Should we provide convenience hooks like `useNodeFocused(nodeKey)` and `useNodeSelected(nodeKey)`?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh, that would be neat!

}

// Register via plugin component
<RendererPlugin renderers={[imageRenderer, videoRenderer]} />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this showing two different ways of registering them, e.g. editor.registerRenderer vs through plugin, or both would be required (e.g. register and enable)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<RendererPlugin /> would be a convenient plugin a la <BehaviorPlugin /> to abstract over editor.registerRenderer(...).

https://github.com/portabletext/editor/blob/main/packages/editor/src/plugins/plugin.behavior.tsx#L8


## Resolution Order

1. Registered renderers (by priority, highest first)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is priority defined? (order of registration? order in the renderer plugin? first defined executes first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order of registration and then the first defined wins. Like Behaviors. (Until we add a Priority API which we would want for Behaviors as well at one point)

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.

3 participants