react-multi-email
react-multi-email copied to clipboard
add emails on format: John Johnson <[email protected]>
It's quite common in gmail and other mail clients that the emails are displayed with the names and then the email inside chevrons, like this: John Johnson [email protected] (see gmail screenshot below)

It would be great to be able to copy paste this kind of format in the textfield and keep the format when it transforms into a chip:

Pasteable example exactly how gmail supports it: Marsellus Wallace <[email protected]>, Winston Wolf <[email protected]>,
.
Maybe this lib could parse the input to a list of objects? [{firstName: 'Marsellus', lastName: 'Wallace', email: '[email protected]'}, ...]
.
How will this component know the user's name? You would need an external service for that.
I would think that you could take the component onChange
event and create a lookup array with names. Then just create your own display component in getLabel
to match up the email (as the key) to your name lookup.
I was thinking the same. But, where do you get the full names? I guess a DB you build up somewhere?