Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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解析器

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...