Switched our Rich Text Editor over to Draft-JS but am having an issue with the mentions plugin.
The mentions plugin expects an array of objects such as below.
const mentions = [
{
name: 'Matthew Russell',
link: 'https://twitter.com/mrussell247',
avatar: 'https://pbs.twimg.com/profile_images/517863945/mattsailing_400x400.jpg',
}
]
My issue is that I'd like to to search on name, but insert the value when selected
const mentions = [
{
name: 'Matthew Russell',
link: 'https://twitter.com/mrussell247',
avatar: 'https://pbs.twimg.com/profile_images/517863945/mattsailing_400x400.jpg',
value: "mr5058"
}
]
For example, when the user searches and selects "Matthew Russel", "mr5058" gets inserted into the text field. Does anyone know of a work around or solution to this?