CommunityToolkit / CommunityToolkit/Labs-Windows

MarkdownTextBlock: add alternative to Text property to pass in a MarkdownDocument to the control

Open
#596 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
482
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Currently, the only way to set the content of a MarkdownTextBlock is via the `Text` property, which internally uses `Markdown.Parse` to convert to a `MarkdownDocument`. It would be nice to also allow users to pass in an existing `MarkdownDocument` as an alternative.
 
Example:

```xaml

```

Benefits:
- Users can insert arbitrary logic after `Markdown.Parse(...)`, such as mutating the MarkdownDocument tree with decorations
- Users can provide a custom Markdown pipeline
- Users can preserve the MarkdownDocument for other operations, such as copying the content to HTML with `Markdown.ToHtml(...)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.