udecode / plate

Rich-text editor with shadcn
https://platejs.org
Other
10.51k stars 647 forks source link

From where can I import "usePlateEventId"? #1350

Closed olhapi closed 2 years ago

olhapi commented 2 years ago

Description

In the docs I can find some usePlateEventId method. But how can I use it and where from it should be imported?

I'm trying to replicate this solution and can't get current focused editor: https://github.com/udecode/plate/discussions/945#discussioncomment-1202008

Tried to search the codebase, but found nothing useful, except docs.

Steps

Sandbox

https://codesandbox.io/s/plate-playground-v1-2mh1c

Expectation

Environment

Funding

Fund with Polar

zbeyens commented 2 years ago

You can use useEventEditorSelectors.focus()

olhapi commented 2 years ago

@zbeyens thanks, that helped a lot! Have a nice day 😊