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

Ability to reference same footnote multiple times #12

Open
StephanMeijer opened this issue Nov 1, 2024 · 4 comments
Open

Ability to reference same footnote multiple times #12

StephanMeijer opened this issue Nov 1, 2024 · 4 comments

Comments

@StephanMeijer
Copy link

StephanMeijer commented Nov 1, 2024

In many standards, such as several1 Markdown1 flavors1 and OOXML it is possible to reference the same footnote multiple times.

I would like to be able to do this also within Tiptap using your extension.

  • There could be a command created to reference an existing footnote.2
  • Creating an HTML id attribute on the reference number would no longer be valid, as multiple references can have the same number.3

Footnotes

  1. https://www.markdownguide.org/extended-syntax/#footnotes 2 3

  2. https://github.com/buttondown/tiptap-footnotes/blob/main/package/src/footnotes/reference.ts#L113-L125

  3. https://github.com/buttondown/tiptap-footnotes/blob/main/package/src/footnotes/reference.ts#L69-L79

Copy link

linear bot commented Nov 1, 2024

@StephanMeijer
Copy link
Author

StephanMeijer commented Nov 1, 2024

GitHub, for example, uses an internal counter to count how many times a specific footnote has been referenced to, to determine the identifier of the reference.

Examples of HTML output of GitHub Example of how this is being used within Github Example of how this is being used within Github

@ivan-plotnikov
Copy link

+1

@jmduke
Copy link
Member

jmduke commented Nov 4, 2024

Love it (and lol at using the issue itself as an example.) Let me get a draft PR up early this week to show you a possible direction.

@jmduke jmduke self-assigned this Nov 4, 2024
@jmduke jmduke assigned jmduke and unassigned jmduke Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants