{"id":16287657,"url":"https://github.com/whistyun/mdxaml","last_synced_at":"2025-04-12T18:47:06.848Z","repository":{"id":40329520,"uuid":"241926938","full_name":"whistyun/MdXaml","owner":"whistyun","description":"Markdown for WPF - alternate version of Markdown.Xaml","archived":false,"fork":false,"pushed_at":"2024-04-27T09:02:03.000Z","size":4100,"stargazers_count":249,"open_issues_count":27,"forks_count":37,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-19T09:15:05.947Z","etag":null,"topics":["flowdocument","markdown","wpf"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whistyun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-20T16:02:12.000Z","updated_at":"2025-01-17T11:51:21.000Z","dependencies_parsed_at":"2023-02-08T19:30:40.914Z","dependency_job_id":"7ce46251-6f5d-4b70-9dc6-c48dfa65f38d","html_url":"https://github.com/whistyun/MdXaml","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whistyun%2FMdXaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whistyun%2FMdXaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whistyun%2FMdXaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whistyun%2FMdXaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whistyun","download_url":"https://codeload.github.com/whistyun/MdXaml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617745,"owners_count":21134197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flowdocument","markdown","wpf"],"created_at":"2024-10-10T19:45:43.430Z","updated_at":"2025-04-12T18:47:06.808Z","avatar_url":"https://github.com/whistyun.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MdXaml\n\nMdXaml is a modify version of Markdown.Xaml.\nIt can convert Markdown to FlowDocument of WPF.\n\n\n## What is Markdown XAML?\n\n[see the origin project page](https://github.com/theunrepentantgeek/Markdown.XAML)\n\nMarkdown XAML is a port of the popular \n[MarkdownSharp](http://code.google.com/p/markdownsharp/) Markdown processor, but with one very \nsignificant difference: Instead of rendering to a string containing HTML, it renders to a \n[FlowDocument](http://msdn.microsoft.com/en-us/library/system.windows.documents.flowdocument.aspx) \nsuitable for embedding into a WPF window or usercontrol.\n\nWith HTML output, details of fonts and colours (and so on) are handled by CSS, but with a \nFlowDocument there's no direct equivalent. Instead of the HTML approch of linking a \nstylesheet to the rendered output, MarkDown.Xaml uses WPF styles that are linked to\nthe rendering engine and applied to the output as it is generated. See the *included demo* \napplication for an example of how this can be configured.\n\n## Samle\n\n![sc1](docs/img.demo/sc1.png)\n![sc2](docs/img.demo/sc2.png)\n![sc3](docs/img.demo/sc3.png)\n![sc4](docs/img.demo/sc4.png)\n![sc5](docs/img.demo/sc5.png)\n\n## Nuget\n\n[https://www.nuget.org/packages/MdXaml/](https://www.nuget.org/packages/MdXaml/)\n\n## Quick start\n\n### Convert markdown-string in a code.\n\n```cs\n// using MdXaml;\n// using System.Windows.Documents;\n\nMarkdown engine = new Markdown();\n\nstring markdownTxt = System.IO.File.ReadAllText(\"example.md\");\n\nFlowDocument document = engine.Transform(markdownTxt);\n```\n\n### Write markdown in a xaml.\n\n```xml\n\u003cWindow x:Class=\"HeredocSample.MainWindow\"\n        xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n        xmlns:mdxam=\"clr-namespace:MdXaml;assembly=MdXaml\"\n        Title=\"MainWindow\" Height=\"450\" Width=\"800\"\u003e\n\n\t\u003cmdxam:MarkdownScrollViewer xml:space=\"preserve\"\u003e\n\t\t# sample title\n\t\t* document1\n\t\t\t* two\n\t\t\t* three\n\t\t* document2\n\t\u003c/mdxam:MarkdownScrollViewer\u003e\n\u003c/Window\u003e\n```\nWe can use MarkdownScrollViewer with code-behind and with binding.\n\n## How to use (Markdown standard)\n* [Transform markdow to flowdocument](docs/transform_markdow_to_flowdocument.md)\n* [Render markdown in Control](docs/render_markdown_in_control.md)\n* [Image reading priority order](docs/image_load_priority.md)\n\n## [How to use (Markdown enhance)](docs/original_enhance.md)\n* list; alphabet-order, roman-order\n* table; row-span, columnspan\n* text alignment\n* text decoration(bold, italic, strikethrough, underline, color)\n\n## Development\n\nIDE: Visual Studio 2019  \nFramework: .NET Framework 4.6.2, .NET Core 3, .NET 5\n\n### Build\n\n1. Clone the repository\n   ```cmd\n   git clone https://github.com/whistyun/MdXaml.git\n   ```\n\n2. If you use VisualStudio, open MdXaml.sln.\n\n   If you use dotnet CLI.\n   ```cmd\n   dotnet build\n   ```\n\n## License\n\nMdXaml is licensed under the MIT license.\n\n## Dependencies (Runtime)\n\n* MdXaml\n  * AvalonEdit (MIT) https://github.com/icsharpcode/AvalonEdit\n\n* MdXaml.Html\n  * AvalonEdit (MIT) https://github.com/icsharpcode/AvalonEdit\n  * HtmlAgilityPack (MIT) https://github.com/zzzprojects/html-agility-pack\n\n* MdXaml.Svg\n  * Svg (MIT) https://github.com/svg-net/SVG\n\n* MdXaml.AnimatedGif\n  * WpfAnimatedGif (Apache-2.0) https://github.com/XamlAnimatedGif/WpfAnimatedGif\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhistyun%2Fmdxaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhistyun%2Fmdxaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhistyun%2Fmdxaml/lists"}