Option to enable/disable Mention / ComboBox Plugin with Predicate #2056
Closed
OliverWales
started this conversation in
Feature Requests
Replies: 2 comments 2 replies
-
PRs for additional options are very appreciated, the slash command is in the roadmap so your contribution will help a lot! |
Beta Was this translation helpful? Give feedback.
2 replies
-
Added in #2166 |
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
-
I'm implementing a feature similar to Notion's
Type '/' for commands
. The Combobox plugin seems to be a good fit for this, except that I'd only like to enable this feature if the slash is at the start of a line.At the moment, I can get close by overriding the
onChangeCombobox
function with one that is almost identical but inserts the following additional quick return logic:But unfortunately I also use the mention plugin for user mentions and adding the above custom combobox plugin seems to break that plugin, as it closes it whenever it is not at the start of a line 🙃
As I see it, the most ideal solution is that the mention and combobox plugins have an additional optional property of
enabled
ordisabled
that allows you to pass some predicate per-plugin as to whether it should open.What do you reckon? Happy to look into providing a PR if it would be useful for others 🙂
Beta Was this translation helpful? Give feedback.
All reactions