Is it possible to trigger the NodeContextMenuPlugin with left click? #7690
-
|
Hi - great framework first of all! I am currently trying to implement mentions and have successfully implemented a typeahead menu for my mentions. But I would also like to open this menu by left clicking on these custom mention nodes to switch the selected mention with one I select in the menu. The NodeContextMenuPlugin seems to be able to open this kind of menu, but as far as I can tell, it will only open on right click. Is it possible to get it opened with left click or should I write my own plugin for this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I ended up using the |
Beta Was this translation helpful? Give feedback.
I ended up using the
registerMutationListenerfunction to register click listeners to my custom nodes, then keeping track of which node was clicked in auseState, then render a menu for the currently active node: https://lexical.dev/docs/concepts/dom-events#2-directly-attach-handlers