whistyun / MdXaml

Markdown for WPF - alternate version of Markdown.Xaml
MIT License
245 stars 37 forks source link

Table of contents or links to anchors #57

Closed LevYas closed 1 year ago

LevYas commented 1 year ago

Hi! Thank you for a great library. Is it possible to navigate on a page with a link to anchors? I tried this https://stackoverflow.com/a/27953547/3087417 but clicking on a link with ClickAction="OpenBrowser" leads to a fatal exception. With ClickAction="DisplayWithRelativePath" it displays the library definition and XAML code of the control or something like that.

whistyun commented 1 year ago

v1.18.1 has be released.

This version enable link to anchors. This feature is enabled when MarkdownScrollViewer.ClickAction is set to OpenBrowser, DisplayWithRelativePath or DisplayAll. Anchor generation rules are the same as for Markdig.

* [Heading1](#heading-1)
* [Heading with link](#heading-with-link)
* [Tag has id attribute](#test)

## Heading (1)

## [Heading with link](https://google.com)

<h2 id="test">Tag has id attribute</h2>
LevYas commented 1 year ago

That was fast, thank you! It works great, closing the issue