Hello, first of all thanks for this great library!
I noticed that the entity used in the mentions plugin is actually hardcoded (https://github.com/draft-js-plugins/draft-js-plugins/blob/master/draft-js-mention-plugin/src/Mention/index.js#L11), it would be great if we could customize the entity that gets used
Hey! Thanks for your nice words, I'm sure @nikgraf will appreciate :) I can see the advantages of such option but could you elaborate on your use case? It would help a lot to think about the best solution.
Now that I thought more about it probably the best solution would be to implement a general autocomplete plugin (as suggested in #78) that would allow devs to control what happens when an item is selected from the dropdown.
Some use cases I'm thinking about are:
a and spanSo yeah what I'd like is a way to control / override the command sent to the editor
@paglias Im doing this in my autocomplete plugin creator
Its a plugin-creator, meaning that it handles most of the boilerplate surrounding the connection to the draft-js-plugin system and just requires the SuggestionEntry Component, the modifier to update the editor when the user clicks/hits enter, and the strategy for opening the suggestions.
I'm currently working on improving the examples and adding some API documentation. Any input you have on what you'd like to see or ways to improve the autocomplete plugin creator would be great!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
@paglias Im doing this in my autocomplete plugin creator
Its a plugin-creator, meaning that it handles most of the boilerplate surrounding the connection to the draft-js-plugin system and just requires the SuggestionEntry Component, the modifier to update the editor when the user clicks/hits enter, and the strategy for opening the suggestions.
I'm currently working on improving the examples and adding some API documentation. Any input you have on what you'd like to see or ways to improve the autocomplete plugin creator would be great!