Replies: 1 comment
-
Even if you don't use it, Plate (plugins for slate) has a bunch of queries that you can follow and reuse, see https://github.com/udecode/plate/tree/main/packages/core/src/common/queries You might also find https://emeraldwalk.github.io/slate-storybook/?path=/story/slate-interfaces--editor useful |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i want to get whole Element/Node from editor.
![image](https://user-images.githubusercontent.com/64771567/149203493-0b780e09-ca03-43a3-8d7e-9055b5a0eb1b.png)
In editor i have three children:
test link
.link
is type of link, which has text and url. What i want is, when i am in that text, selection is insidelink
text, i want to get Element, where i can check what type it is, check for url, or text. However i am able to get only text by this commandconst node = Editor.first(editor, editor.selection);
I checked for lot of methods, but didnt find anything. Maybe i am doing it wrong, or there isnt really way, how to get element from selection.
Thanks for advices
Beta Was this translation helpful? Give feedback.
All reactions