-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow users to pass a custom findSuggestionMatch
to Suggestion plugin
#4515
allow users to pass a custom findSuggestionMatch
to Suggestion plugin
#4515
Conversation
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @svenadlung ?
Looks good to me. Thank you so much for your contribution @estrattonbailey. I think we could add the new prop to the docs as well: https://tiptap.dev/api/utilities/suggestion Btw: I just see that the |
Thanks for the quick review! I added to the docs, feel free to edit. I'm not 100% on what |
Hey @svenadlung 👋 just wanted to bump this in case it got lost in the shuffle 😄 |
Awesome, thx. LGTM. |
Hey @svenadlung 👋 no particular rush on my end, but any chance we can get this merged and released soon-ish? Thanks for your help! |
Hey @svenadlung just bumping this again :) thanks! |
8b0c991
to
76b8a29
Compare
Please describe your changes
Hey there 👋 we're using Tiptap and the Suggestions plugin to implement hashtags in our editor. Our hashtag validation is a little more complex than what the default
findSuggestionMatch
allows, so I started investigating how I could replace the matching with a custom version. This seemed to be the most straightforward approach.Disclaimer: this might be more of a conversation starter than a fix, but fwiw it does work for my needs right now. Happy to help improve.
How did you accomplish your changes
Just added a new property
findSuggestionMatch
to theSuggestion
plugin, with types that match the built-in function.How have you tested your changes
Just manually integrating at the moment, but lmk if I can assist with a test suite.
How can we verify your changes
I think it's straightforward.
Checklist
Related issues
N/A