-
Hello all ! I'm working on some components for an editor: a button and an Editable. The button has many functionalities but among them some search text (all voice activated). In order to show the matches when the search voice command is processed through the ToolbarButton I was thinking on using a custom Editable with some decorators (basically a carbon copy of the slate search text demo). The problem I'm facing is the Button Component and the Editor component are independent and I need to sync the search term. Is it possible to use the Store for this ? hierarchy wise these elements are siblings: <Plate
initialValue={initialValue}
plugins={plugins}
renderEditable={() => <EditableVoiceCommands />}
>
<HeadingToolbar>
<ToolbarVoiceCommandsButton {...args} />
</HeadingToolbar>
</Plate> As I was mentioning, the idea if that if I say "select Lorem" then lorem is stored and the custom Editable reacts to this change. Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can use plate store for anything but I strongly recommend having your own store – I'm using https://github.com/udecode/zustood which is very fast to setup |
Beta Was this translation helpful? Give feedback.
You can use plate store for anything but I strongly recommend having your own store – I'm using https://github.com/udecode/zustood which is very fast to setup