Skip to content

Tags based on Mentions example #4563

Answered by TheSpyder
Deliaz asked this question in Q&A
Discussion options

You must be logged in to vote

It's more complicated than it looks. The entire premise of that code is that there needs to be two words, it finds the point before them both and then checks if the string of the two words is #<text>.

Doing it for a single character means a dedicated search just for it:
https://codesandbox.io/s/slate-tags-editor-forked-1imot?file=/src/editor.tsx

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Deliaz
Comment options

Answer selected by Deliaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants