Skip to content

Add footnotes support#8840

Open
mejo- wants to merge 14 commits into
mainfrom
feat/footnotes
Open

Add footnotes support#8840
mejo- wants to merge 14 commits into
mainfrom
feat/footnotes

Conversation

@mejo-

@mejo- mejo- commented Jul 8, 2026

Copy link
Copy Markdown
Member

📝 Summary

Some implementation details:

  • In UI, the reference IDs are hidden on purpose. Instead, all references and their corresponding footnotes get a sequential ordinal that is displayed. The footnotes are ordered by their ordinal. This is how Obsidian and others do it as well and it avoids confusion regarding manually used and out-of order numeric references.
  • References can be inserted either via [^label] input rule or via Ctrl-Shift-F shortcut. The latter automatically creates a reference ID (the first digit that is not already in use as reference ID).
  • Deleting a reference also removes it's corresponding footnote if no other reference to the footnote exists.

🖼️ Screenshots

Editor with visible container Markdown
image image grafik

Todo

  • Clarify if we want to add a menubar entry to insert a footnote. If so, where do we place it?
  • Decide whether we want the visual container with background color or not.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

🤖 AI (if applicable)

  • The content of this PR was partly generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

mejo- added 5 commits July 8, 2026 18:38
customize markdown-it-footnote for simpler HTML output structure.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- added this to the Nextcloud 35 milestone Jul 8, 2026
@mejo- mejo- self-assigned this Jul 8, 2026
@mejo- mejo- added enhancement New feature or request feature: formatting Features related to text formatting and node types format: markdown labels Jul 8, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Jul 8, 2026
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Jul 8, 2026
mejo- added 9 commits July 9, 2026 01:41
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>

@marcoambrosini marcoambrosini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! A couple of comments from a quick first pass:

  • I would avoid using a container and gray out the text instead
  • I would put this in a new add menu in the toolbar, same as the + in the document, where we can access everything from one bucket. And with a search-bar on top of the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature: formatting Features related to text formatting and node types format: markdown

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Footnote support Footnote support would be nice

2 participants