Entry and positionSuggestions components should be in the Mention Plugin
See original GitHub issueFor the mentions-plugin I don’t understand why Entry
and positionSuggestions
components are not included in the plugin. Then we could simply import Entry
to use and positionSuggestions
would just be internal.
import { Entry, positionSuggestions} from './components/Mention/mentions'
const mentionPlugin = createMentionPlugin({
mentions,
positionSuggestions,
theme: mentionsStyles
})
Would become:
const mentionPlugin = createMentionPlugin({
mentions,
theme: mentionsStyles
})
const { Entry } = mentionPlugin
I could probably setup a PR for this if it sounds good.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Mention - DraftJS Plugins - High quality plugins with great UX
This plugin allows the user to choose an entry from a list. ... The MentionSuggestions component is part of the plugin and should...
Read more >How to use the draft-js-mention-plugin function in draft ... - Snyk
To help you get started, we've selected a few draft-js-mention-plugin examples, based on popular ways it is used in public projects.
Read more >z4o4z/draft-js-mention-plugin/CHANGELOG.md - UNPKG
17, - Remove prevState and state from positionSuggestions ... If provided the passed component is used to render a Mention.
Read more >Mention list and emoji top position (Draft.js) - Stack Overflow
You can achieve it with positionSuggestions configuration option. This option available for both mention and emoji plugins.
Read more >Draft-js Mention Docs - CodeSandbox
mentionSuggestionsEntryAvatar :CSS class for an entry's avatar image in the suggestions component. positionSuggestionsThe function can be used to manipulate ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll reopen this because I think it should go into the mentions plugin
I just thought this was a more consistent way of doing it. Not a big deal, so happy for the issue to be closed as I don’t think anyone minds the current approach of using the positionSuggestions function. Also the API has changed a little in the current version so looks like this is not as relevant.