TMP_InputField input text as a label

How to input a text as a label, and modified it as a whole?
I have used tags of rich text, like <link=id>, but the text still cannot be treated as a whole item.
This function is like the @ function on discord or any other chat software. When you select @someone, it will generate a label on inputfield, and you can delete it or bolden it as a whole.
image