[MarkdownTextBlock] Support Extensions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Bắt đầu bằng cách xác định MarkdownTextBlock cùng với tích hợp hiện có của nó với Markdig MarkdownPipeline và renderer. So sánh các thuộc tính UseFoo tích hợp được đề xuất với cách tiếp cận XAML CustomElements/IElement; công việc được xem là hoàn tất khi các extension có thể được cấu hình theo kiểu khai báo cho cả việc phân tích cú pháp và render.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Proposal: Extensions
The underlying parser Markdig supports extensions. Some of these come bundled with that package, such as Pipe Tables and Diagrams. Others can be added with extra code.
Simple properties for built-in extensions
<md:MarkdownTextBlock UseEmphasisExtras="True" UseAutoLinks="True" Text="..." />
We can ship with a few UseFoo properties that allow to configure the built-in extensions that end up both in the MarkdownPipeline and the Renderer. This makes it super easy to control which Markdown extensions get enabled without having to mess around with a MarkdownPipeline or any C# code.
Custom extensions
Declaration in XAML:
<md:MarkdownTextBlock Text="...">
<md:MarkdownTextBlock.CustomElements>
<foo:CustomElement />
</md:MarkdownTextBlock.CustomElements>
</md:MarkdownTextBlock>
And C#, implementing a new interface we ship IElement:
class CustomElement : IElement<CustomObject>
{
// Parsing
public void AddToPipeline(MarkdownPipelineBuilder pipelineBuilder)
{
pipelineBuilder.Extensions.Add(...);
}
// Rendering
public UWPObjectRenderer<CustomObject> GetObjectRenderer() => new CustomRenderer();
}
With this approach, we can allow users to add arbitrary extensions on top of the control in a very simple and declarative manner. A quick glance at the XAML tells you all the built-in and custom extensions currently being used.
Originally posted by @jcoc611-microsoft in https://github.com/CommunityToolkit/Labs-Windows/discussions/536#discussioncomment-11309494
- Ngôn ngữ chính
- C#
- Star
- 484
- Fork
- 89
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CommunityToolkit/Labs-Windows
-
bug :bug:
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 80/100
CommunityToolkit/Labs-Windows#815 ·
-
bug :bug:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
CommunityToolkit/Labs-Windows#816 ·
-
bug :bug:
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
CommunityToolkit/Labs-Windows#814 ·
-
experiment :test_tube:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
CommunityToolkit/Labs-Windows#812 ·
-
ux :paintbrush:
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
CommunityToolkit/Labs-Windows#808 · 1 bình luận ·
Tất cả issue của CommunityToolkit/Labs-Windows
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
gavin-wolfe/wolfden#104 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Still libmicrohttpd dependency is not removed properly from External-Dependency-Info.txt fileĐang mởtype/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[辞書] かんそうりつ->乾燥率Đang mở辞書
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
thomhurst/TUnit#7201 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
ArduPilot/MissionPlanner#3826 ·
Maintainer thường phản hồi trong vòng 1 ngày