How do I create within-page relative links so that when a user clicks on one of the links, the app scrolls to the corresponding section of the document? I know TOC somewhat implements this functionality, but I wonder if we can also create inline links to link document sections.
Example of Inline TOC (but does not have to limit to TOC use case): Suppose I have the following markdown:
TOC
[Link 1](#ref1)
[Link 2](#ref2)
[Link 3](#ref3)
# Title 1{#ref1}
Lorem Ipsum ....
## Title 2{#ref2}
Lorem Ipsum ....
Text 1{#ref3}
Clicking on Link 1 should jump to Title 1 which is H1; Clicking on Link 2 should jump to Title 2, which is H2; and clicking Link 3 should jump to Text 1, which is an inline text.
Hi @sapphire008 , this is closer to a business requirement. You can try using the onTap of LinkConfig, combined with url, to achieve custom navigation.
How do I create within-page relative links so that when a user clicks on one of the links, the app scrolls to the corresponding section of the document? I know TOC somewhat implements this functionality, but I wonder if we can also create inline links to link document sections.
Example of Inline TOC (but does not have to limit to TOC use case): Suppose I have the following markdown:
Clicking on Link 1 should jump to Title 1 which is H1; Clicking on Link 2 should jump to Title 2, which is H2; and clicking Link 3 should jump to Text 1, which is an inline text.