Skip to content

feat: insert footnote at end of word#52

Open
chrisgrieser wants to merge 2 commits intoMichaBrugger:masterfrom
chrisgrieser:dev
Open

feat: insert footnote at end of word#52
chrisgrieser wants to merge 2 commits intoMichaBrugger:masterfrom
chrisgrieser:dev

Conversation

@chrisgrieser
Copy link
Copy Markdown

@chrisgrieser chrisgrieser commented Mar 21, 2025

Similar to #25, addresses the problem outlined in #23.

Differences to #25:

  • much less code, since making use of Obsidian API to determine the end of a word
  • also considers any potential punctuation, so the footnote is inserted after the punctuation, not before.
  • Includes a setting that can disable this behavior; the lack of such a setting appeared to be the blocker for move cursor to end of word when creating footnote #25.

@Comprehensive-Jason
Copy link
Copy Markdown
Collaborator

Huge thanks for writing this, I'll work on merging it!

I'm not super familiar with Obsidian's API, and have been waiting to make changes until after the Obsidian devs finish adding features around footnotes so I can utilize them in the plugin. Have there been any API changes that would let the plugin trigger the new native footnote creation popup?

@chrisgrieser
Copy link
Copy Markdown
Author

I am not aware of any new footnote-related APIs. While the footnote popup is an improvement, I do find it still lacking in comparison to this plugin (no easy way of navigating, etc.). Also, I assume using a popup window would require a significant rewrite of the plugin, which would probably be a whole different issue not necessarily related to this PR in particular.

@Comprehensive-Jason
Copy link
Copy Markdown
Collaborator

Gotcha, no problem. I also found the footnote popup to be rather annoying and glitchy, especially if your cursor inadvertently gets stuck in the popup instead of the document.

@chrisgrieser chrisgrieser force-pushed the dev branch 2 times, most recently from 9bea606 to 22fcaee Compare April 28, 2025 14:03
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

Successfully merging this pull request may close these issues.

2 participants