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

FR: 'Strange New Worlds' support #299

Open
greetclammy opened this issue Jan 3, 2025 · 1 comment
Open

FR: 'Strange New Worlds' support #299

greetclammy opened this issue Jan 3, 2025 · 1 comment

Comments

@greetclammy
Copy link

greetclammy commented Jan 3, 2025

Please add support for the plugin Strange New Worlds 🙏

It's a wonderful plugin that shows backlinks for every block/heading that's referenced elsewhere in the vault—by adding a counter next to them. On hover over the counter, a pop-up window opens with a list of backlinks and a preview of the note where it originated from. It also adds an alternative backlink pane, which shows more context than the native one.

It'd be super useful if you could bring up a hover editor in Strange New Worlds's pop-up window and backlink pane.

I also made a FR for SNW to support page preview and the Hover Editor here:

@greetclammy greetclammy changed the title FR: 'Strange New Worlds' FR: 'Strange New Worlds' support Jan 3, 2025
@pjeby
Copy link
Collaborator

pjeby commented Jan 3, 2025

Any plugin that wants to support either Obsidian's built-in page preview or hover editor simply needs to trigger the standard Obsidian hover events when the mouse is over a link. Here is an example from the Recent Files plugin:

https://github.com/tgrosinger/recent-files-obsidian/blob/24986b9fd61b7acaf9c56ca61cca785c2e0d481f/main.ts#L153

Plugins also need to either use an existing hover link source type, or register their own.

There are some further nuances to the process that are unfortunately not documented. But a plugin that works with the built-in page preview should generally work correctly with Hover Editor without any additional work, as HE supports the same events.

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

2 participants