Skip to content

Feature Request: Add "Copy Relative Link" to Markdown Heading Context Menu #2653

@seaspeak

Description

@seaspeak

Is your feature request related to a problem? Please describe.
Markdown syntax naturally supports this kind of "inner-page jump" by using anchors (e.g., [Section Title](#section-title)). The current method of getting a link is to right-click on a heading, but the copied link is a full path (e.g., file:///C:/Users/user/Documents/notes/my-note.md#my-section).

It's a manual and tedious process to copy the full link and then strip out the file path to get the relative anchor link (#my-section).

Image

Describe the solution you'd like
I propose adding a new option called Copy Raw Link to the right-click context menu that appears when you click on a Markdown heading in the editor. (Copy Raw Link: Creates a direct link that keeps original characters for non-Latin languages while automatically removing special symbols for better compatibility.[The algorithm is same as Copy Link Address but reserves original non-Latin characters, like CJK])

This new option would copy only the relative anchor part of the link, which is the heading's slug (e.g., #my-section), a link that keeps original characters for languages like CJK while removing special symbols.

Describe alternatives you've considered

Additional context
See also #2586 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions