Open mxstbr opened 7 years ago
I think a corresponding function that you might need is onMentionBackspace
. The default can be the function that you have right now but the user can override it.
Agree, what about calling them onMentionSelection
and onMentionDeletion
?
Maybe onMentionInsertion
instead of selection
(since arrow keys are technically selecting it?)
This would allow developers to specify how to render their selected mention. It should also be possible to allow them to make the
suggestions
array data any data structure they want, since they can just format it at the end to fit into the editor.