steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
12.47k stars 1.03k forks source link

extend multiple characters similar to '/' to trigger different dropdown plugins #272

Open Hj419522039 opened 7 months ago

Hj419522039 commented 7 months ago

I want to extend multiple characters similar to '/' to trigger different dropdown plugins, but after copying a set of code, I'm getting an error saying 'Adding different instances of a keyed plugin (suggestion$)'. I also tried adding a key in addOptions, but I'm still having issues. Can you help explain how to extend multiple characters?

andrewdoro commented 7 months ago

https://tiptap.dev/docs/editor/api/utilities/suggestion#find-suggestion-match I think you need to write your custom function to do this