-
Notifications
You must be signed in to change notification settings - Fork 28
Added new kb article rendering-markdown-in-telerik-reporting-templates #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dnikolov-prg
merged 6 commits into
master
from
new-kb-rendering-markdown-in-telerik-reporting-templates-7745b5c2cecc4db6a4f556f05f1455bf
Dec 11, 2025
+103
−0
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
63dac07
Added new kb article rendering-markdown-in-telerik-reporting-templates
fdcc91b
Update rendering-markdown-in-telerik-reporting-templates.md
IvetNikolova e43d715
Update rendering-markdown-in-telerik-reporting-templates.md
IvetNikolova 6878a7f
Update rendering-markdown-in-telerik-reporting-templates.md
dnikolov-prg 04fb9e8
Update rendering-markdown-in-telerik-reporting-templates.md
dnikolov-prg b9c37c2
Update rendering-markdown-in-telerik-reporting-templates.md
dnikolov-prg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
103 changes: 103 additions & 0 deletions
103
knowledge-base/rendering-markdown-in-telerik-reporting-templates.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| --- | ||
| title: Use Markdown in Telerik Reporting | ||
| description: "Learn how to use and render markdown content in Telerik Reporting by converting it to HTML, which can be displayed via the HtmlTextBox item." | ||
| type: how-to | ||
| page_title: Using Markdown in Telerik Reporting via HTML Conversion | ||
| meta_title: Using Markdown in Telerik Reporting via HTML Conversion | ||
| slug: rendering-markdown-in-telerik-reporting-templates | ||
| tags: reporting, htmltextbox, markdown, html, azure-devops | ||
| res_type: kb | ||
| ticketid: 1703063 | ||
| --- | ||
|
|
||
| ## Environment | ||
|
|
||
| <table> | ||
| <tbody> | ||
| <tr> | ||
| <td> Product </td> | ||
| <td> Reporting </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
|
|
||
| ## Description | ||
|
|
||
| I want to use [Markdown](https://en.wikipedia.org/wiki/Markdown) content from Azure DevOps wiki pages in Telerik reports. Markdown is not directly supported in Telerik Reporting, and I need a way to display the content within the report somehow. | ||
|
|
||
| ## Solution | ||
|
|
||
| Telerik Reporting does not have native support for rendering markdown syntax directly. However, you can use the [HtmlTextBox]({%slug telerikreporting/designing-reports/report-structure/htmltextbox/overview%}) report item to display HTML content, which supports a limited set of HTML tags and CSS attributes. Follow these steps: | ||
|
|
||
| ### Externally Convert to HTML | ||
|
|
||
| 1. Use an external MD -> HTML converter(e.g. [Convert Markdown to HTML](https://markdowntohtml.com/)) to transform the `MD` content into `HTML`. | ||
| 1. Pass the converted HTML content to the [HtmlTextBox]({%slug telerikreporting/designing-reports/report-structure/htmltextbox/overview%}) report item in your Telerik report. | ||
| 1. Ensure that the HTML content uses only the [supported HTML tags and CSS attributes]({%slug htmltextbox_formatting_and_styling%}). | ||
|
|
||
| ### Convert to HTML via User Functions | ||
|
|
||
| If the `MD` content cannot be converted to `HTML` beforehand, create a [User Function]({%slug telerikreporting/designing-reports/connecting-to-data/expressions/extending-expressions/user-functions%}) that accepts the Markdown input and returns the corresponding HTML output. You may refer to the sample code below as a guideline. | ||
|
|
||
| > To use the `Markdown.ToHtml` function, install the following NuGet package in the project with the user function - [Markdig](https://www.nuget.org/packages/Markdig/0.44.0?_src=template) | ||
|
|
||
| ````C# | ||
| namespace UserFunc | ||
| { | ||
| public class Class1 | ||
| { | ||
| public static string ConvertMarkdownToHtml(string markdown) | ||
| { | ||
| if (string.IsNullOrEmpty(markdown)) | ||
| return string.Empty; | ||
|
|
||
| return Markdown.ToHtml(markdown); | ||
| } | ||
|
|
||
| ```` | ||
|
|
||
| - Input: | ||
|
|
||
| ```` | ||
| # Hello World | ||
|
|
||
| This is a **bold** statement, and this is *italic*. | ||
|
|
||
| ## Features | ||
|
|
||
| - Item 1 | ||
| - Item 2 | ||
| - Item 3 | ||
|
|
||
| Visit [Google](https://google.com) for more info. | ||
|
|
||
| > This is a blockquote. | ||
|
|
||
| --- | ||
|
|
||
| Done! | ||
| ```` | ||
|
|
||
| - Output: | ||
|
|
||
| ````HTML | ||
| <h1>Hello World</h1> | ||
| <p>This is a <strong>bold</strong> statement and this is <em>italic</em>.</p> | ||
| <h2>Features</h2> | ||
| <ul> | ||
| <li>Item 1</li> | ||
| <li>Item 2</li> | ||
| <li>Item 3</li> | ||
| </ul> | ||
| <p>Visit <a href="https://google.com">Google</a> for more info.</p> | ||
| <blockquote> | ||
| <p>This is a blockquote.</p> | ||
| </blockquote> | ||
| <hr /> | ||
| <p>Done!</p> | ||
| ```` | ||
|
|
||
| ## See Also | ||
|
|
||
| * [HtmlTextBox Overview]({%slug telerikreporting/designing-reports/report-structure/htmltextbox/overview%}) | ||
| * [Styling and Formatting the HtmlTextBox Report Item]({%slug htmltextbox_formatting_and_styling%}) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.