Custom Mentions
Is there a way to incorporate the Draft-js plugins : draft-js-mention-with-custom-add-plugin as well as the plugin that is used for templating?? I need to have the mention render to the page as {{ mention }} instead of @mention, so that I can use templating. I would also like to add a tooltip to the {{ mention }}
I have tried to use a custom decorator but it does not work.
Help would be appreciated!
I also would like to know if it's possible to customize the rendering of the mention suggestions.
Yeah, another +1 here too. The odd bit is there is that trigger parameter... which does if fact alter the initiator of the event. This suggests that there is indeed a selector being examined, although only the one most recent character. I'm looking through the source to attempt to locate it; if I can track it down, I'll mod an open a PR.
@yourgirlcodes - So I've been digging through the code for the ability to alter the triggers on the mentions. This is not a fix, though in your specific case it may be adequate. In the Editor component declaration, try this:
separator: '{',
trigger: '{',
I'm still going to mod it (in my case, I need <<## as the initiating string), but if you're simply after {{mention}} that's a fast and dirty way to tackle it.
is there any way to customize the mention dropdown as I need to show user image , name email properly and should have flexibilty to style accordingly