Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link that jumps to a section in the page #171

Open
sapphire008 opened this issue Apr 19, 2024 · 1 comment
Open

Link that jumps to a section in the page #171

sapphire008 opened this issue Apr 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sapphire008
Copy link

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.

@sapphire008 sapphire008 added the enhancement New feature or request label Apr 19, 2024
@asjqkkkk
Copy link
Owner

asjqkkkk commented Apr 26, 2024

Hi @sapphire008 , this is closer to a business requirement. You can try using the onTap of LinkConfig, combined with url, to achieve custom navigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants