Hi!
I am trying to display user tags in an editor at the same time the user is editing the input text. Is there any way to have inline tags in an editor field? I already have a custom editor, but it only changes the color of the cursor basically. I am new to Xamarin as well, so I am not entirely comfortable with creating custom renderers.
The editor has a data binding to a string CommentText in the viewmodel.
When the user taps on the person they want to tag I get a string value like this: string tagContent = "@PersonName&Id", which I then use to change CommentText with this method:
public static string BuildStringWithTagContent(string tagContent, string originalText)
{
string[] splitText = originalText.Split(' ');
for (int i = 0; i < splitText.Length; i++)
{
if (splitText[i].Contains("@"))
{
splitText[i] = tagContent;
}
}
return string.Join(" ", splitText);
}
But instead of this format I would like to display a tag or even just the user's full name. I tried a converter to convert to the full name, but that changes the CommentText as well which is problematic because I need to tagContent value to send to the backend.
I could save the tags and then puzzle in them somehow to the CommentText, but that does feel like a solution with many shortcomings.
Any ideas how to show some inline tags instead?

