Reputation: 1179
I'm creating an input that contains a logical expression e.g. a user can type 'A' AND 'B', 'A' AND ('B' OR 'C'), etc. The expressions can get as complex as the user likes so I would like to add a brace matching feature that will highlight the close brace of the open brace the cursor is currently on in yellow, like it's done in various IDEs.
I've seen various examples of highlighting all the text in the input but haven't come across anything to highlight specific characters, and have also read that you can only apply one style to an element. I'm kind of lost on how to go about this.
Upvotes: 1
Views: 46
Reputation: 3082
The answer is, unfortunately, no.
You need either to find a ready-made UI component for that or wrap up your own. That, on the other hand, is completely possible.
Upvotes: 1