How to replace text in textarea with a mat-chip?

Viewed 1274

In my case I have a textarea where the user can create a template for an email with variables. A valid variable name would be '$TIMESTAMP$'. The user can switch the input between text- and visual-mode. In the visual-mode all variables should be replaced with a mat-chip for better visualization but the text should still be editable.

Is there a way to solve my problem?

PS: If possible I just want to use material components not other external libraries.

Edit: enter image description here

0 Answers
Related