added support for  prop allowing to pass a function for calculating how to display a mention in the plain text