Skip to content

Commit

Permalink
Merge pull request #611 from telerik/nadya-syntaxeditor-taggers
Browse files Browse the repository at this point in the history
Add XMLFoldingTagger, LineHighlightTagger, JavaScriptFoldingTagger in…
  • Loading branch information
DinkoK authored Aug 7, 2024
2 parents a2b8cbc + ec8a526 commit 9d04cbd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
8 changes: 7 additions & 1 deletion controls/syntax-editor/features/taggers/folding-taggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ position: 2

# Folding Taggers

The folding taggers are used when you want to create collapsible (foldable) sections of code in a document. The base class responsible for this functionality is the **FoldingTaggerBase** class with concrete implementations provided out of the box being the **BracketFoldingTagger**, **CSharpFoldingTagger** and **VisualBasicFoldingTagger**.
The folding taggers are used when you want to create collapsible (foldable) sections of code in a document. **FoldingTaggerBase** class is the base class responsible for this functionality. The following folder taggers are available in our suite:

* **CSharpFoldingTagger**
* **VisualBasicFoldingTagger**
* **XmlFoldingTagger**
* **JavaScriptFoldingTagger**
* **BracketFoldingTagger**

>caption RadSyntaxEditor with a registered CSharpFoldingTagger
Expand Down
24 changes: 15 additions & 9 deletions controls/syntax-editor/features/taggers/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,24 @@ The matched tags are then processed by the [UI layers]({%slug syntax-editor-feat

## Predefined Taggers

**RadSyntaxEditor** comes with a number of predefined taggers:
**RadSyntaxEditor** comes with a number of predefined taggers and folding taggers:

* **CSharpTagger**: A tagger responsible for the syntax-highlighting in the C# programming language.
* **VisualBasicTagger**: A tagger responsible for the syntax-highlighting in the Visual Basic programming language.
* **JavaScriptTagger**: A tagger responsible for the syntax-highlighting in the JavaScript programming language.
* **XmlTagger**: A tagger responsible for the syntax-highlighting in the XML programming language.
* **SqlTagger**: A tagger responsible for the syntax-highlighting in the T-SQL (Transact-SQL) programming language.
* **CSharpTagger**: A tagger responsible for syntax highlighting in the C# programming language.
* **VisualBasicTagger**: A tagger responsible for syntax highlighting in the Visual Basic programming language.
* **JavaScriptTagger**: A tagger responsible for syntax highlighting in the JavaScript programming language.
* **XmlTagger**: A tagger responsible for syntax highlighting in the XML programming language.
* **SqlTagger**: A tagger responsible for syntax highlighting in the T-SQL (Transact-SQL) programming language.
* **BracketFoldingTagger**: A tagger responsible for creating collapsible (folding) regions in the code. Can be used for the JavaScript language.
* **CSharpFoldingTagger**: A tagger responsible for creating folding regions in C# code.
* **VisualBasicFoldingTagger**: A tagger responsible for creating folding regions in Visual Basic code.
* **TextSearchHighlightTagger**: A tagger which prepares collection of TextHighlightTag for all occurrences of a given search word.
* **TextSearchUnderlineTagger**: A tagger which prepares collection of UnderlineTag for all occurrences of a given search word.
* **XmlFoldingTagger**: A tagger responsible for creating collapsible (folding) regions in XML, XAML, and HTML code documents.
* **JavaScriptFoldingTagger**: A tagger class responsible for creating collapsible (folding) regions in JavaScript code documents.
* **TextSearchHighlightTagger**: A tagger that prepares a collection of TextHighlightTag for all occurrences of a given search word. The class exposes a **UpdateSearchWord** method used to determine the word that will be highlighted.
* **TextSearchUnderlineTagger**: A tagger that prepares a collection of UnderlineTag for all occurrences of a given search word. The class exposes a **UpdateSearchWord** method used to determine the word that will be underlined.
* **LineHighlightTagger**: A tagger that prepares a collection of TextHighlightTags for a collection of lines. The class exposes a HighlightLines method taking an IEnumerable<int> and is used to determine the lines that will be highlighted. The tagger also provides a **HighlightMode** property of type LineHighlightMode which has the following possible values:
* **TextOnly**: Highlights only the text portion of the line. This is the default value.
* **LineStartToTextEnd**: Highlights from the beginning of the line to the end of the text portion of the line.


## Register a Tagger

Expand Down Expand Up @@ -65,7 +71,7 @@ RadSyntaxEditor1.TaggersRegistry.RegisterTagger(foldingTagger)

>note As of R2 2021 **RadSyntaxEditor** offers **ShouldTaggersProcessEntireLines** property that indicates whether the entire line should be processed by the taggers.
# See Also
## See Also

* [How to Achieve Underline Text in RadSyntaxEditor]({%slug underline-text-in-syntax-editor%})

Expand Down

0 comments on commit 9d04cbd

Please sign in to comment.