How to set special Highlighting for a custom placeholder?

SyntaxEditor for WPF Forum

Posted 10 years ago by Stefan
Version: 11.1.0540
Avatar
Hello,

in our documents, we have some placeholders like [[Placeholder]]. Now we want to highlight these placeholders, for example with foreground color green.

How can I do this?

Best regards,
Stefan

Comments (2)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Stefan,

You can do that either (1) in your lexer by assigning tokens with classification types that have related highlighting styles, or (2) by creating a classification tagger like in our AdornmentsHighlightWord QuickStart with an associated highlighting style. The lexer way is probably easier of the two options.


Actipro Software Support

Posted 10 years ago by Stefan
Avatar
Hello,

I implemented a tagger. In OnTags, I searched for my placeholders with a regex.

Thanks for your help,
Stefan
The latest build of this product (v2019.1 build 0686) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.