Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| ## Open Questions | ||
|
|
||
| - Should we provide convenience hooks like `useNodeFocused(nodeKey)` and `useNodeSelected(nodeKey)`? |
| } | ||
|
|
||
| // Register via plugin component | ||
| <RendererPlugin renderers={[imageRenderer, videoRenderer]} /> |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
<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) |
There was a problem hiding this comment.
how is priority defined? (order of registration? order in the renderer plugin? first defined executes first?
There was a problem hiding this comment.
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)
d25c73b to
915ae95
Compare
915ae95 to
5a3a7a7
Compare
No description provided.