Anyway I can have one toolbar and multiple fields on page? #2846
-
Hello everybody, I'm creating feature where I will have many editors but the editors will be at different places on the page and what I want is that to have one toolbar controlling each and every editor on the page. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can either create multiple controlled editors or use plate/packages/plate-utils/src/useMarkToolbarButton.ts Lines 4 to 39 in c86175c The most efficient solution would be to add a new provider in |
Beta Was this translation helpful? Give feedback.
You can either create multiple controlled editors or use
id
parameter in editor hooks likeuseEditorRef
oruseEditorSelector
. Most toolbar components do not supportid
prop so you'd need to fork hooks like theseplate/packages/plate-utils/src/useMarkToolbarButton.ts
Lines 4 to 39 in c86175c