I'm trying to implement the dropdown part of the mentions example from Slate's Examples:
I understand how to make a custom leaf to change my text blue and underline it, but I don't see how Slate's mentions example allows a dropdown list to appear with options when "@" is typed.
That would require some type of hooking into the
onKeyDowncommand in Slate
we have a roadmap item open to allow extending built-in Slate methods, but right now this will be kinda tough
because we use the
onKeyDownmethod, but we do not expose a way for you to "hook into it"
we would happily accept a PR to be able to extend that method, but otherwise, this is on our roadmap and we will be tackling it soon
Ok perfect! Has the team looked into Tiptap and their rich text editor? They have a lot of out or the box extensions one could add
It will personally be my first PR/contribution of github but I'm getting very familiar with the code base and our team is looking to use payload to handle the content for our 20+ client sites
Awesome!!
I know
@360823574644129795has built a custom rich text field that relies on Lexical, and you could do the same with TipTap
In fact lexical already supports mentions
@1028003433090924695😉 Definitely recommend it over tiptap
I will give this a look! Thank you
mentions arent configured to use payload users or something like that yet, but adding that shouldn't be too hard
I just need the to mention arbitrary variables I set so should be fine 👍
does npm work for the plugin or does it still have to be done manually?
Perfect! Currently it's just using this ^^
npm doesn't work at the moment, so you'd need to add it to your project manually
If you do wanna use it already - maybe wait a few hours or so. Just made some breaking changes to the link node, will push those soon
Ok I will standby 👍 Appreciate it
done! You can use it now 🙂
Sweet! I DM'd you a question on the plugin
Star
Discord
online
Get dedicated engineering support directly from the Payload team.