HTML Tagger

1 Answer 177 Views
SyntaxEditor
Kabir
Top achievements
Rank 1
Kabir asked on 27 May 2021, 12:41 AM

How can i make a HTML Syntax Highlight Tagger for Syntax Editor. Can anyone please help.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 May 2021, 08:29 AM
Hello, Kabir,

RadSyntaxEditor works with the underlying document with the help of taggers. Taggers are used to identify spans of text and assign them a specific tag if they match a specific condition. RadSyntaxEditor comes with a number of predefined taggers: 
https://docs.telerik.com/devtools/winforms/controls/syntax-editor/features/taggers/overview#predefined-taggers 

You can refer to our Demo application >> Syntax Editor >> First look example. It demonstrates how different files are loaded in RadSyntaxEditor and highlighted according to the added tagger. For .xaml and .html files the example uses the XmlTagger. Please give the example a try and see how it works for your case.

Note that you can also define your own language by creating a derivative of the WordTaggerBase. A sample implementation is demonstrated here: https://docs.telerik.com/devtools/winforms/controls/syntax-editor/features/taggers/custom-language 
It is possible to download the Telerik source code from your account and have a look at the internal implementation that the existing taggers have: 
https://docs.telerik.com/devtools/winforms/installation-and-upgrades/download-product-files 
https://docs.telerik.com/devtools/winforms/knowledge-base/attach-telerik-source-code-to-your-project 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Kabir
Top achievements
Rank 1
commented on 27 May 2021, 04:35 PM

Thank you :)
Tags
SyntaxEditor
Asked by
Kabir
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or