Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daoyull/markdig.avalonia
Avalonia的Markdown解析器
https://github.com/daoyull/markdig.avalonia
avalonia markdown
Last synced: about 1 month ago
JSON representation
Avalonia的Markdown解析器
- Host: GitHub
- URL: https://github.com/daoyull/markdig.avalonia
- Owner: daoyull
- License: mit
- Created: 2024-08-12T07:23:38.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-13T06:53:19.000Z (3 months ago)
- Last Synced: 2024-10-10T18:45:42.106Z (about 1 month ago)
- Topics: avalonia, markdown
- Language: C#
- Homepage:
- Size: 481 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markdig.Avalonia
Avalonia的Markdown解析器已经默认渲染
* 标题语法
* 段落语法
* 强调语法
* 引用语法
* 列表语法
* 代码语法
* 分隔线语法
* 链接语法
* 图片语法
* Html标签
* 代码块## 使用方式
App.xaml
```xaml
```MainView
``` xaml
```
MainViewModel
```csharp
public partial class MainViewModel : ObservableObject
{
public MainViewModel()
{
// 先加载主题
CodeThemeManager.AddTheme(ThemeName.DarkPlus);
}[ObservableProperty] private string? _text;
[RelayCommand]
private async Task LoadMarkdown()
{
Text = await File.ReadAllTextAsync(Path.Combine(Directory.GetCurrentDirectory(), "Markdown", "Demo.md"));
}[RelayCommand]
private void Empty()
{
Text = "";
}
}
```## 演示截图
演示文档来自 [Naccl's Blog](https://naccl.top/blog/24)
目前还只是初步的demo...