You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MarkdownTextBlock is a evolution of the existing MarkdownTextBlock in the community toolkit. This new implementation uses the popular [Markdig](https://github.com/xoofx/markdig) library for parsing. This solves some long standing bugs and feature gaps in our existing implementation.
27
27
28
-
## Templated Controls
28
+
## Feature Showcase
29
+
See all the markdown features and syntax supported by the control:
29
30
30
-
The Toolkit is built with templated controls. This provides developers a flexible way to restyle components
31
-
easily while still inheriting the general functionality a control provides. The examples below show
32
-
how a component can use a default style and then get overridden by the end developer.
31
+
> [!Sample MarkdownTextBlockExampleSample]
33
32
34
-
> [!Sample MarkdownTextBlockCustomSample]
33
+
## Interactive Live Editor
34
+
Try typing markdown and see it rendered in real-time:
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
[ToolkitSample(id:nameof(MarkdownTextBlockCustomSample),"Custom control",description:$"A sample for showing how to create and use a {nameof(CommunityToolkit.Labs.WinUI.MarkdownTextBlock)}custom control.")]
[ToolkitSample(id:nameof(MarkdownTextBlockExampleSample),"Full Example",description:$"A comprehensive example showcasing all the features and capabilities of the {nameof(CommunityToolkit.Labs.WinUI.MarkdownTextBlock)} control with various markdown syntax.")]
This control was originally written by [Nero Cui](https://github.com/nerocui) for [JitHub](https://github.com/JitHubApp/JitHubV2). The control is powered by the popular [Markdig](https://github.com/xoofx/markdig) markdown parsing library and *almost* supports the full markdown syntax, with a focus on super-efficient parsing and rendering.
@@ -29,10 +29,6 @@ public sealed partial class MarkdownTextBlockCustomSample : Page
29
29
30
30
31
31
32
-
**Try it live!** Type in the *unformatted text box*!
33
-
34
-
35
-
36
32
# COMMENTS
37
33
38
34
Comments can be added in Markdown, and they won't be rendered to the screen.
@@ -595,27 +591,18 @@ public MarkdownConfig MarkdownConfig
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
[ToolkitSample(id:nameof(MarkdownTextBlockLiveEditorSample),"Live Editor",description:$"An interactive live editor for the {nameof(CommunityToolkit.Labs.WinUI.MarkdownTextBlock)} control. Type markdown and see it rendered in real-time.")]
0 commit comments